Microchip® Advanced Software Framework

vendor_data.h File Reference

Declarations of API functions to access vendor specific data functionality.

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

#include <stdio.h>
#include "rf4ce.h"
#include "zrc.h"

Data Structures

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

Macros

#define APPLICATION_SEND_COORDINATES_TIME   200000
 
#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
}
 Enum Ids for vendor-specific commands. More...
 
enum  vendor_status_tag {
  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...
 
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 APPLICATION_SEND_COORDINATES_TIME   200000
#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 

Enum Ids for vendor status code.

Enumerator
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.

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

References FUNC_PTR, nlde_data_request(), PROFILE_ID_ZRC, and vendor_data_confirm().

Referenced by print_vendor_data_submenu().