Client Notify implementation.
Copyright (c) 2018 - 2019 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
#include "string.h"
#include "client_notify.h"
#include "otau_notify.h"
#include "miwi_config.h"
#include "miwi_api.h"
Macros | |
#define | MULTIPLIER (10) |
Functions | |
static void | otauClientSendNotify (void) |
static void | otauClientStartTimer (void) |
void | otauNotifyInit (void) |
void | otauNotifyRcvdFrame (addr_mode_t addr_mode, uint8_t *src_addr, uint16_t length, uint8_t *payload) |
void | otauNotifySentFrame (uint8_t messageId, addr_mode_t addr_mode, uint8_t *addr, uint8_t status) |
void | otauNotifyTimerHandler (struct SYS_Timer_t *timer) |
Variables | |
const otauClientInfoIndication_t | clientInfo |
uint8_t | clientNotifyRetryRunningCount |
otauNotifyState_t | notifyState |
otauNotifyTimerState_t | notifyTimerState |
uint16_t | otauClientNotifyInterval = CLIENT_NOTIFY_INTERVAL_SEC |
uint8_t | otauClientNotifyJitterPercent = CLIENT_NOTIFY_JITTER_PERCENT |
uint8_t | otauClientNotifyRetryCount = CLIENT_NOTIFY_RETRY_COUNT |
uint8_t | otauLedToggleCount |
uint8_t | otauNotifyConfirmWait = 0 |
#define MULTIPLIER (10) |
Referenced by otauClientStartTimer().
|
static |
References otauClientNotifyIndication_t::arch_type, DOMAIN_OTAU_NOTIFY, otauClientNotifyIndication_t::domainId, EXTENDED_ADDR_MODE, EXTENDED_ADDR_SIZE, get_node_address(), otauClientNotifyIndication_t::ieee_addr, otauClientNotifyIndication_t::ieee_addr_mode, MiApp_MeshGetNextHopAddr(), otauClientNotifyIndication_t::msgId, MY_PAN_ID, node_address_t::native_addr, NATIVE_ADDR_MODE, NOTIFY_CLIENT_NOTIFY_STATE, notifyState, NULL, OTA_CLIENT_NOTIFY, otauDataSend(), otauNotifyConfirmWait, otauClientNotifyIndication_t::pan_id, otauClientNotifyIndication_t::parent_addr_mode, otauClientNotifyIndication_t::parent_short_addr, serverAddress, SUPPORTED_MODE, and otauClientNotifyIndication_t::supported_modes.
Referenced by otauNotifySentFrame(), and otauNotifyTimerHandler().
|
static |
void otauNotifyInit | ( | void | ) |
References CLIENT_NOTIFY_STATE, clientNotifyRetryRunningCount, NOTIFY_IDLE, notifyState, notifyTimerState, and otauClientNotifyRetryCount.
Referenced by otauInit().
void otauNotifyRcvdFrame | ( | addr_mode_t | addr_mode, |
uint8_t * | src_addr, | ||
uint16_t | length, | ||
uint8_t * | payload | ||
) |
References CLIENT_IDENTIFY_STATE, DOMAIN_OTAU_NOTIFY, otauClientDiscoveryReq_t::interval, otauClientDiscoveryReq_t::jitter_percent, LED_TOGGLE_COUNT, LED_TOGGLE_INTERVAL_MILLISEC, NOTIFY_CLIENT_INFO_STATE, notifyState, notifyTimerState, OTA_CLIENT_DISCOVERY, OTA_CLIENT_INFO_REQ, OTA_IDENTIFY_REQ, OTA_RESET_REQ, otauClientNotifyInterval, otauClientNotifyJitterPercent, otauClientNotifyRetryCount, otauClientStartTimer(), otauDataSend(), otauLedToggleCount, otauNotifyConfirmWait, otauResetDevice(), otauSetServerDetails(), otauTimerStart(), otauClientDiscoveryReq_t::retry_count, and TIMER_MODE_PERIODIC.
Referenced by otauRcvdFrame().
void otauNotifySentFrame | ( | uint8_t | messageId, |
addr_mode_t | addr_mode, | ||
uint8_t * | addr, | ||
uint8_t | status | ||
) |
References clientNotifyRetryRunningCount, NOTIFY_CLIENT_NOTIFY_STATE, NOTIFY_IDLE, notifyState, OTAU_SUCCESS, otauClientNotifyRetryCount, otauClientSendNotify(), otauClientStartTimer(), and otauNotifyConfirmWait.
Referenced by otauDataConf(), and otauDataSend().
void otauNotifyTimerHandler | ( | struct SYS_Timer_t * | timer | ) |
const otauClientInfoIndication_t clientInfo |
uint8_t clientNotifyRetryRunningCount |
Referenced by otauNotifyInit(), otauNotifySentFrame(), and otauNotifyTimerHandler().
otauNotifyState_t notifyState |
Referenced by otauClientSendNotify(), otauNotifyInit(), otauNotifyRcvdFrame(), and otauNotifySentFrame().
otauNotifyTimerState_t notifyTimerState |
Referenced by otauNotifyInit(), otauNotifyRcvdFrame(), and otauNotifyTimerHandler().
uint16_t otauClientNotifyInterval = CLIENT_NOTIFY_INTERVAL_SEC |
Referenced by otauClientStartTimer(), and otauNotifyRcvdFrame().
uint8_t otauClientNotifyJitterPercent = CLIENT_NOTIFY_JITTER_PERCENT |
Referenced by otauClientStartTimer(), and otauNotifyRcvdFrame().
uint8_t otauClientNotifyRetryCount = CLIENT_NOTIFY_RETRY_COUNT |
Referenced by otauNotifyInit(), otauNotifyRcvdFrame(), otauNotifySentFrame(), and otauNotifyTimerHandler().
uint8_t otauLedToggleCount |
Referenced by otauNotifyRcvdFrame(), and otauNotifyTimerHandler().
uint8_t otauNotifyConfirmWait = 0 |
Referenced by otauClientSendNotify(), otauNotifyRcvdFrame(), otauNotifySentFrame(), and otauNotifyTimerHandler().