Microchip® Advanced Software Framework

bmngt.h File Reference

PRIME Base Management.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "compiler.h"

Data Structures

struct  _FupInfoIdList
 
struct  FUPAckCallBack
 
union  FupBufferCrc
 
struct  FUPErrorIndCallBack
 
struct  FupErrorInfo
 
struct  FupFrameInfo
 
struct  FupKillInfo
 
struct  FUPStatusIndCallBack
 
struct  FupStatusInfo
 
struct  FUPVersionIndCallBack
 
struct  FupVersionInfo
 
struct  FUStatusCmd
 
struct  MsgPProfileParams
 
struct  NetworkEvent
 
struct  NetworkEventAlive
 

Macros

#define BASEMNG_ACK   1
 
#define BASEMNG_ACK_ERROR   1
 
#define BASEMNG_ACK_OK   0
 
#define BASEMNG_EVENT_ALIVE_NETWORK   0x29
 
#define BASEMNG_EVENT_NETWORK   0x28
 
#define BASEMNG_GETBANNEDMACLIST_RESPONSE   0x10
 
#define CMD_FUP_PROTOCOL(A)   ((A)&CMD_FUP_PROTOCOL_MSK)
 
#define CMD_FUP_PROTOCOL_MSK   0x3F
 
#define ERRORIND_LENGTH   8
 
#define FRAME_SIZE   256
 
#define FW_VERSION_SIZE   32
 
#define INFO_LIST_MAX_SIZE   32
 
#define INFO_LIST_NUMBER_ID   3
 
#define KILLIND_LENGTH   7
 
#define MAC_SIZE   6
 
#define MAC_SIZE   6
 
#define MAX_BUFFER_RCV   500
 
#define PPROF_GETPIB_RESPONSE   0x20
 
#define PROTOCOL_FUP   0x1D
 
#define STATUSIND_LENGTH   12
 
#define VERSIONIND_MAX_LENGTH   103
 

Typedefs

typedef struct _FupInfoIdList FupInfoIdList
 

Enumerations

enum  BaseMngBannedMacValues {
  BASEMNG_ADDBANNEDMACLIST_REQUEST = 0x28,
  BASEMNG_REMOVEBANNEDMACLIST_REQUEST = 0x29,
  BASEMNG_CLEARBANNEDMACLIST_REQUEST = 0x2A,
  BASEMNG_ENABLEBANNEDMACLIST_REQUEST = 0x2B,
  BASEMNG_DISABLEBANNEDMACLIST_REQUEST = 0x2C,
  BASEMNG_MODIFYBANNEDMACLIST_REQUEST = 0x2D,
  BASEMNG_GETBANNEDMACLIST_REQUEST = 0x2E
}
 
enum  FupAckValues {
  FUP_ACK_OK = 0,
  FUP_ACK_ERROR = 1,
  FUP_ACK_ERROR_MACADD = 2,
  FUP_ACK_ERROR_VENDOR = 3,
  FUP_ACK_ERROR_MODEL = 4,
  FUP_ACK_ERROR_CRC = 5,
  FUP_ACK_ERROR_DATA = 6,
  FUP_ACK_ERROR_CRCFILE = 7,
  FUP_ACK_CRC_INPROCESS = 8,
  FUP_ACK_FU_INPROCESS = 9
}
 
enum  FupErrorValues {
  FU_ERROR_NODE_NOERROR = 0,
  FU_ERROR_NODE_WRONGSTATE_EXEC = 1,
  FU_ERROR_NODE_WRONGSTATE_UPG = 2,
  FU_ERROR_NODE_WRONGSTATE = 3,
  FU_ERROR_NODE_WRONGSTATE_RCV = 4,
  FU_ERROR_NODE_WRONGSTATE_CNTDWN = 5,
  FU_ERROR_NODE_FW_NOTMATCH = 6,
  FU_ERROR_NODE_REVERT_ERRORINIT = 7,
  FU_ERROR_NODE_REVERT_ERR7 = 8,
  FU_ERROR_NODE_RETRY_KILL = 9,
  FU_ERROR_NODE_UNICAST_TIMEOUT = 10,
  FU_ERROR_NODE_CONFIRM_IND = 11,
  FU_ERROR_NODE_REVERT_CRCNOK = 12,
  FU_ERROR_NODE_RESTART = 13,
  FU_ERROR_NODE_WRONG_MISS_BITMAP = 14,
  FU_ERROR_NODE_WRONG_MISS_LIST = 15,
  FU_ERROR_NODE_VENDOR_INVALID = 16,
  FU_ERROR_NODE_VENDOR_NOTMATCH = 17,
  FU_ERROR_NODE_MODEL_INVALID = 18,
  FU_ERROR_NODE_MODEL_NOTMATCH = 19
}
 
enum  FupReqValues {
  FUP_CLEARTARGETLIST_REQUEST = 0x14,
  FUP_ADDTARGET_REQUEST = 0x15,
  FUP_SETFWDATA_REQUEST = 0x16,
  FUP_SETUPGOPTIONS_REQUEST = 0x17,
  FUP_INITFILETX_REQUEST = 0x18,
  FUP_DATAFRAME_REQUEST = 0x19,
  FUP_CRC_REQUEST = 0x1A,
  FUP_ABORT_FUP_REQUEST = 0x1B,
  FUP_START_FU_REQUEST = 0x1C,
  FUP_SETMATCHRULES_REQUEST = 0x1D,
  FUP_VERSION_REQUEST = 0x1E,
  FUP_STATE_REQUEST = 0x1F
}
 
enum  FupStates {
  FUP_STATE_IDLE = 0,
  FUP_STATE_INIT = 1,
  FUP_STATE_JOIN = 2,
  FUP_STATE_MULT = 3,
  FUP_STATE_UNIC = 4,
  FUP_STATE_RSTR = 5,
  FUP_STATE_CFRM = 6,
  FUP_STATE_END = 7,
  FUP_STATE_KILL = 8,
  FUP_STATE_CNTDWN = 9
}
 
enum  FupValues {
  FUP_ACK = 1,
  FUP_STATUS_INDICATION = 3,
  FUP_ERROR_INDICATION = 4,
  FUP_VERSION_INDICATION = 5,
  FUP_KILL_INDICATION = 6
}
 
enum  FupWarningValues {
  FU_WARNING_NODE_ALREADY_UPDATE = 128,
  FU_WARNING_NODE_ALREADY_EXECUTED = 129,
  FU_WARNING_NODE_LINK_QUALITY = 130
}
 
enum  PrimeProfReqValues {
  PPROF_GETPIB_REQUEST = 0x30,
  PPROF_SETPIB_REQUEST = 0x31,
  PPROF_RESETSTAT_REQUEST = 0x32,
  PPROF_REBOOTDEV_REQUEST = 0x33
}
 

Functions

void baseMng_Process (void)
 
uint8_t baseMng_receivedCmd (uint8_t *buf, uint16_t len)
 
int8_t baseMng_SendBuf (uint8_t *bufPtr, uint16_t len)
 
int8_t baseMng_SendEventNetwork (void *event)
 
int8_t baseMng_SendPProfMsg (MsgPProfileParams *rsp)
 
void baseMng_Start (void)
 
int8_t fup_clearTargetList (void)
 
int8_t fup_addNewTarget (uint8_t *macAddr)
 
int8_t fup_SetFwDataRequest (uint8_t *fwdata)
 
int8_t fup_SetMatchRulesRequest (uint8_t *fwdata)
 
int8_t fup_SetUpgOptionsRequest (uint8_t *fwdata)
 
int8_t fup_InitFileTxRequest (uint8_t *fwdata)
 
int8_t fup_DataFrameRequest (FupFrameInfo *frameInfo)
 
int8_t fup_EndFileTxRequest (void)
 
int8_t fup_checkCrcStatus (void)
 
int8_t fup_enableFU (uint8_t enable)
 
int8_t fup_abort (uint8_t *macadd)
 
int8_t fup_getVersionRequestfromNode (uint8_t *macadd)
 
int8_t fup_getStateRequestfromNode (uint8_t *macadd)
 
void fup_SendStatus (FupStatusInfo *statusinfo)
 
void fup_SendError (FupErrorInfo *errorinfo)
 
void fup_SendVersion (FupVersionInfo *versioninfo)
 
void fup_SendKill (FupKillInfo *killinfo)
 
void fup_Init (void)
 
void fup_Start (void)
 
void fup_Process (void)
 
int8_t ifaceFUP_send_ACK (uint8_t ackcmd, uint8_t ackerrcode)
 
int8_t ifaceFUP_send_FrameACK (uint8_t ackerrcode, uint16_t numfr)
 
int ifaceFUP_Unpack_DataFrameRequest (uint8_t *dataPtr, uint16_t len, uint16_t *numFrame)