Microchip® Advanced Software Framework

atmel_rf4ce/lib/inc/vendor_data.h File Reference
#include <stdio.h>
#include "rf4ce.h"
#include "zrc.h"

Data Structures

struct  fw_data_frame_tag
 Structure handling firmware data frames. More...
 

Macros

#define MAX_NWK_VENDOR_DATA_SIZE   90
 The maximum size of a vendor-specific data frame; i.e. More...
 

Typedefs

typedef struct fw_data_frame_tag fw_data_frame_t
 Structure handling firmware data frames. More...
 
typedef enum vendor_cmd_id_tag vendor_cmd_id_t
 Enum Ids for vendor-specific commands. More...
 
typedef enum vendor_status_tag vendor_status_t
 Enum Ids for vendor status code. More...
 

Enumerations

enum  vendor_cmd_id_tag {
  BATTERY_STATUS_REQ,
  BATTERY_STATUS_RESP,
  ALIVE_REQ,
  ALIVE_RESP,
  FW_VERSION_REQ,
  FW_VERSION_RESP,
  RX_ON_REQ,
  RX_ON_RESP,
  FW_DATA_REQ,
  FW_DATA_RESP,
  FW_SWAP_REQ,
  FW_SWAP_RESP,
  BATTERY_STATUS_REQ,
  BATTERY_STATUS_RESP,
  ALIVE_REQ,
  ALIVE_RESP,
  FW_VERSION_REQ,
  FW_VERSION_RESP,
  RX_ON_REQ,
  RX_ON_RESP,
  FW_DATA_REQ,
  FW_DATA_RESP,
  FW_SWAP_REQ,
  FW_SWAP_RESP
}
 Enum Ids for vendor-specific commands. More...
 
enum  vendor_status_tag {
  VD_SUCCESS,
  VD_NOT_SUPPORTED_ATTRIBUTE,
  VD_UNSUPPORTED_SIZE,
  VD_INVALID_CHECKSUM,
  VD_SUCCESS,
  VD_NOT_SUPPORTED_ATTRIBUTE,
  VD_UNSUPPORTED_SIZE,
  VD_INVALID_CHECKSUM
}
 Enum Ids for vendor status code. More...
 

Functions

void vendor_app_alive_req (void)
 Vendor data alive request. More...
 
void vendor_data_confirm (nwk_enum_t Status, uint8_t PairingRef)
 Vendor data confirm. More...
 
void vendor_data_ind (uint8_t PairingRef, profile_id_t ProfileId, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags)
 Vendor data indication. More...
 
bool vendor_data_request (uint8_t PairingRef, profile_id_t ProfileId, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t TxOptions)
 Vendor data request. More...
 

#define MAX_NWK_VENDOR_DATA_SIZE   90

The maximum size of a vendor-specific data frame; i.e.

maximum MSDU - header and footer overhead: aMxMACSafePayloadSize - 12

Structure handling firmware data frames.

Enum Ids for vendor-specific commands.

Enum Ids for vendor status code.

Enum Ids for vendor-specific commands.

Enumerator
BATTERY_STATUS_REQ 
BATTERY_STATUS_RESP 
ALIVE_REQ 
ALIVE_RESP 
FW_VERSION_REQ 
FW_VERSION_RESP 
RX_ON_REQ 
RX_ON_RESP 
FW_DATA_REQ 
FW_DATA_RESP 
FW_SWAP_REQ 
FW_SWAP_RESP 
BATTERY_STATUS_REQ 
BATTERY_STATUS_RESP 
ALIVE_REQ 
ALIVE_RESP 
FW_VERSION_REQ 
FW_VERSION_RESP 
RX_ON_REQ 
RX_ON_RESP 
FW_DATA_REQ 
FW_DATA_RESP 
FW_SWAP_REQ 
FW_SWAP_RESP 

Enum Ids for vendor status code.

Enumerator
VD_SUCCESS 
VD_NOT_SUPPORTED_ATTRIBUTE 
VD_UNSUPPORTED_SIZE 
VD_INVALID_CHECKSUM 
VD_SUCCESS 
VD_NOT_SUPPORTED_ATTRIBUTE 
VD_UNSUPPORTED_SIZE 
VD_INVALID_CHECKSUM 

void vendor_app_alive_req ( void  )

Vendor data alive request.

Hook for the application indicating that an alive request command was received.

Vendor data alive request.

void vendor_data_confirm ( nwk_enum_t  Status,
uint8_t  PairingRef 
)

Vendor data confirm.

Callback function indicating status of the request

Parameters
StatusStatus of the request
PairingRefPairing reference used for the transmission

Vendor data confirm.

Parameters
statusnwk status (constants defined by nwk layer)
PairingRefPairing reference

References UNUSED.

void vendor_data_ind ( uint8_t  PairingRef,
profile_id_t  ProfileId,
uint16_t  VendorId,
uint8_t  nsduLength,
uint8_t *  nsdu,
uint8_t  RxLinkQuality,
uint8_t  RxFlags 
)

Vendor data indication.

Callback function indicating incoming vendor data.

Parameters
PairingRefPairing reference of the sender
ProfileIdProfile id used for the transmission
VendorIdVendor id used for the transmission
nsduLengthLength of the payload data
nsduPointer to the payload data
RxLinkQualityLQI of the incoming frame
RxFlagsOptions used for transmission
Returns
true if command could be handled; else false

Vendor data indication.

Parameters
PairingRefPairing reference
ProfileIdProfile id.
VendorIdVendor ID.
nsduLengthLength of the payload.
nsduActual payload
RxLinkQualityLink quality of received packet.
RxFlagsRx Flags.

References UNUSED.

Referenced by main(), stack_indication_callback_init(), and zid_indication_callback_init().

bool vendor_data_request ( uint8_t  PairingRef,
profile_id_t  ProfileId,
uint16_t  VendorId,
uint8_t  nsduLength,
uint8_t *  nsdu,
uint8_t  TxOptions 
)

Vendor data request.

The vendor data request allows a device to send a vendor specific data frame.

Parameters
PairingRefPairing reference of the recipient of the transmission
ProfileIdProfile id used for the transmission
VendorIdVendor id used for the transmission
nsduLengthLength of the payload data
nsduPointer to the payload data
TxOptionsTransit options
Returns
true if command could be handled; else false

Vendor data request.

Parameters
PairingRefThe pairing reference of the device.
ProfileIdProfile-Id (ZRC or ZID)
VendorIdVendor-id
nsduLengthlength of the data
nsduThe data pointer.
TxOptionsTo fill in the control field