OADProtocol¶
Defines
-
OADProtocol_DEFAULT_MAX_RETRIES
¶ Default Max number of retries for timed out packets to be used by client and server.
retry timeouts and max number or retries
-
OADProtocol_DEFAULT_REQ_RATE
¶ Max number of retries for timed out packets to be used by client and server.
-
OADProtocol_FW_VERSION_STR_LEN
¶ Max Length of the FW version string.
-
OADProtocol_PKT_CMDID_OFFSET
¶ Offset to packet type files in packet header.
-
OADProtocol_IMAGE_ID_LEN
¶
-
OADProtocol_IMAGE_HDR_LEN
¶
-
OADProtocol_PACKET_TYPE_FW_VERSION_REQ
¶ Firmware version request.
Req/Rsp Packet Types
-
OADProtocol_PACKET_TYPE_FW_VERSION_REQ_LEN
¶ Firmware version request size.
-
OADProtocol_PACKET_TYPE_FW_VERSION_RSP
¶ Firmware version response.
-
OADProtocol_PACKET_TYPE_FW_VERSION_RSP_LEN
¶ Firmware version response.
-
OADProtocol_VER_RSP_VERSIONSTRING_OFFSET
¶ Offset to version string in FW Ver Response.
-
OADProtocol_PACKET_TYPE_OAD_IMG_IDENTIFY_REQ
¶ OAD update image identify request.
-
OADProtocol_PACKET_TYPE_OAD_IMG_IDENTIFY_REQ_LEN
¶ OAD update image identify request.
-
OADProtocol_IMG_IDENTIFY_REQ_IMG_ID_OFFSET
¶ Offset to status in Image Identify Response.
-
OADProtocol_IMG_IDENTIFY_REQ_IMG_HDR_OFFSET
¶ Offset to status in Image Identify Response.
-
OADProtocol_PACKET_TYPE_OAD_IMG_IDENTIFY_RSP
¶ OAD update image identify response.
-
OADProtocol_PACKET_TYPE_OAD_IMG_IDENTIFY_RSP_LEN
¶ OAD update image identify response.
-
OADProtocol_IMG_IDENTIFY_RSP_STATUS_OFFSET
¶ Offset to status in Image Identify Response.
-
OADProtocol_PACKET_TYPE_OAD_BLOCK_REQ
¶ OAD update image block request.
-
OADProtocol_PACKET_TYPE_OAD_BLOCK_REQ_LEN
¶ OAD update image block request.
-
OADProtocol_BLOCK_REQ_IMG_ID_OFFSET
¶ Offset to 16B block num in Block Request.
-
OADProtocol_BLOCK_REQ_BLOCK_NUM_OFFSET
¶ Offset to 16B block num in Block Request.
-
OADProtocol_BLOCK_REQ_MULTI_BLOCK_SIZE_OFFSET
¶ Offset to 16B block num in Block Request.
-
OADProtocol_PACKET_TYPE_OAD_BLOCK_RSP
¶ OAD update image block request.
-
OADProtocol_PACKET_TYPE_OAD_BLOCK_RSP_LEN
¶ OAD update image block request.
-
OADProtocol_PACKET_TYPE_OAD_RESET_REQ
¶ OAD reset request.
-
OADProtocol_PACKET_TYPE_OAD_RESET_REQ_LEN
¶ OAD reset request size.
-
OADProtocol_PACKET_TYPE_OAD_RESET_RSP
¶ OAD reset response.
-
OADProtocol_PACKET_TYPE_OAD_RESET_RSP_LEN
¶ OAD reset response size.
-
OADProtocol_BLOCK_RSP_IMG_ID_OFFSET
¶ Offset to 16B block num in Block Request.
-
OADProtocol_BLOCK_RSP_BLOCK_NUM_OFFSET
¶ Offset to 16B block num in Block Request.
-
OADProtocol_BLOCK_RSP_BLOCK_DATA_OFFSET
¶ Offset to block data in Block Response.
Typedefs
-
typedef void
(* fwVersionReqCb_t)
(void *pSrcAddr)¶ firmware version request packet callback function type
-
typedef void
(* fwVersionRspCb_t)
(void *pSrcAddr, char *fwVersionStr)¶ firmware version response packet callback function type
-
typedef void
(* oadImgIdentifyReqCb_t)
(void *pSrcAddr, uint8_t imgId, uint8_t *imgMetaData)¶ OAD image identify request packet callback function type.
-
typedef void
(* oadImgIdentifyRspCb_t)
(void *pSrcAddr, uint8_t status)¶ OAD image identify response packet callback function type.
-
typedef void
(* oadBlockReqCb_t)
(void *pSrcAddr, uint8_t imgId, uint16_t blockNum, uint16_t multiBlockSize)¶ OAD image block request packet callback function type.
-
typedef void
(* oadBlockRspCb_t)
(void *pSrcAddr, uint8_t imgId, uint16_t blockNum, uint8_t *blkData)¶ OAD image block response packet callback function type.
-
typedef void
(* oadResetReqCb_t)
(void *pSrcAddr)¶ OAD reset request packet callback function type.
-
typedef void
(* oadResetRspCb_t)
(void *pSrcAddr)¶ OAD reset response packet callback function type.
-
typedef void*
(* radioAccessAllocMsg_t)
(uint32_t size)¶ function definition for sending message over the radio
-
typedef OADProtocol_Status_t
(* radioAccessPacketSend_t)
(void *pDstAddress, uint8_t *payload, uint32_t msgSize)¶ function definition for sending message over the radio
Enums
Functions
-
struct
__attribute__
((packed))¶
-
void
OADProtocol_Params_init
(OADProtocol_Params_t * params)¶ Function to initialize the OADProtocol_Params struct to its defaults.
Defaults values are: pRadioAccessFxns = {0} pCallbacks = {0}
- Parameters
params
: An pointer to RF_Params structure for initialization
-
void
OADProtocol_init
(void)¶ Function that initializes the Wsn Protocol Task and creates all TI-RTOS objects.
-
void
OADProtocol_open
(OADProtocol_Params_t * params)¶ Function to open the OADProtocol module.
- Parameters
params
: An pointer to RF_Params structure for initialization
-
OADProtocol_Status_t
OADProtocol_ParseIncoming
(void * pSrcAddr, uint8_t * incomingPacket)¶ Function to parse OADProtocol packets.
- Parameters
pSrcAddr
: address of the device that sent the messageincomingPacket
: pointer to packet to be parsed
-
OADProtocol_Status_t
OADProtocol_sendFwVersionReq
(void * pDstAddress)¶ Function to send a FW version request packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the request to
-
OADProtocol_Status_t
OADProtocol_sendFwVersionRsp
(void * pDstAddress, char * fwVersion)¶ Function to send a FW version response packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the response tofwVersion
: Firmware version string to send
-
OADProtocol_Status_t
OADProtocol_sendImgIdentifyReq
(void * pDstAddress, uint8_t imgId, uint8_t * pImgInfoData)¶ Function to send an OAD image identify request packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the request toimgId
: image ID used for requesting image blockspImgInfoData
: Image header
-
OADProtocol_Status_t
OADProtocol_sendOadIdentifyImgRsp
(void * pDstAddress, uint8_t status)¶ Function to send an OAD image identify request packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the response tostatus
: status to send
-
OADProtocol_Status_t
OADProtocol_sendOadImgBlockReq
(void * pDstAddress, uint8_t imgId, uint16_t blockNum, uint16_t multiBlockSize)¶ Function to send an OAD block request packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the request toimgId
: image ID of image blocksblockNum
: block Number to requestmultiBlockSize
: Numer of blocks in the multi Block transfer (0 or 1 for none-multiblock)
-
OADProtocol_Status_t
OADProtocol_sendOadImgBlockRsp
(void * pDstAddress, uint8_t imgId, uint16_t blockNum, uint8_t * block)¶ Function to send an OAD block response packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the response toimgId
: image ID of image blocksblockNum
: Block numberblock
: pointer to image block
-
OADProtocol_Status_t
OADProtocol_sendOadResetReq
(void * pDstAddress)¶ Function to send a OAD reset request packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the request to
-
OADProtocol_Status_t
OADProtocol_sendOadResetRsp
(void * pDstAddress)¶ Function to send a OAD reset response packet.
- Return
- Status
- Parameters
pDstAddress
: Address to send the response to
Variables
-
OADProtocol_imgIdentifyPld_t
¶
-
struct
OADProtocol_MsgCBs_t
¶ - #include <oad_protocol.h>
OADProtocol callback table.
Public Members
-
fwVersionReqCb_t
pfnFwVersionReqCb
¶ Incoming FW Req.
-
fwVersionRspCb_t
pfnFwVersionRspCb
¶ Incoming FW Version Rsp.
-
oadImgIdentifyReqCb_t
pfnOadImgIdentifyReqCb
¶ Incoming Image Identify Req.
-
oadImgIdentifyRspCb_t
pfnOadImgIdentifyRspCb
¶ Incoming Image Identify Rsp.
-
oadBlockReqCb_t
pfnOadBlockReqCb
¶ Incoming OAD Block Req.
-
oadBlockRspCb_t
pfnOadBlockRspCb
¶ Incoming OAD Block Rsp.
-
oadResetReqCb_t
pfnOadResetReqCb
¶ Incoming OAD Reset Req.
-
oadResetRspCb_t
pfnOadResetRspCb
¶ Incoming OAD Reset Rsp.
-
fwVersionReqCb_t
-
struct
OADProtocol_RadioAccessFxns_t
¶ - #include <oad_protocol.h>
OADProtocol radio access functions.
Public Members
-
radioAccessAllocMsg_t
pfnRadioAccessAllocMsg
¶ Function for allocating a message buffer.
-
radioAccessPacketSend_t
pfnRadioAccessPacketSend
¶ Function for sending message over the radio.
-
radioAccessAllocMsg_t
-
struct
OADProtocol_Params_t
¶ - #include <oad_protocol.h>
RF parameter struct RF parameters are used with the OADProtocol_open() and OADProtocol_Params_init() call.
Public Members
-
OADProtocol_RadioAccessFxns_t*
pRadioAccessFxns
¶ Radio access function table.
-
OADProtocol_MsgCBs_t*
pProtocolMsgCallbacks
¶ Application Callbacks for pressing packets.
-
OADProtocol_RadioAccessFxns_t*