Go to the documentation of this file.00001
00011
00012
00013
00014
00015
00016
00017 #if ((defined VENDOR_DATA) || (defined DOXYGEN))
00018
00019
00020
00021 #ifndef VENDOR_DATA_H
00022 #define VENDOR_DATA_H
00023
00024
00025
00026 #include <stdio.h>
00027
00028 #include "rf4ce.h"
00029 #include "zrc.h"
00030
00031
00032
00035 #define MAX_NWK_VENDOR_DATA_SIZE 90
00036
00037 #define APPLICATION_SEND_COORDINATES_TIME 200000
00038
00039
00040
00044 typedef enum vendor_cmd_id_tag
00045 {
00046 BATTERY_STATUS_REQ,
00047 BATTERY_STATUS_RESP,
00048 ALIVE_REQ,
00049 ALIVE_RESP,
00050 FW_VERSION_REQ,
00051 FW_VERSION_RESP,
00052 RX_ON_REQ,
00053 RX_ON_RESP,
00054 FW_DATA_REQ,
00055 FW_DATA_RESP,
00056 FW_SWAP_REQ,
00057 FW_SWAP_RESP
00058 #ifdef ADC_ACCELEROMETER
00059 ,
00060 ACC_ENABLE_REQ,
00061 ACC_DISABLE_IND,
00062 ACC_POSITION
00063 #endif
00064 } SHORTENUM vendor_cmd_id_t;
00065
00069 typedef struct fw_data_frame_tag
00070 {
00071 vendor_cmd_id_t cmd_id;
00072 uint16_t frame_cnt;
00073 uint16_t total_num_frames;
00074 uint8_t fw_data[0];
00075 } fw_data_frame_t;
00076
00080 typedef enum vendor_status_tag
00081 {
00082 VD_SUCCESS,
00083 VD_NOT_SUPPORTED_ATTRIBUTE,
00084 VD_UNSUPPORTED_SIZE,
00085 VD_INVALID_CHECKSUM
00086 } SHORTENUM vendor_status_t;
00087
00088
00089
00090
00107 bool vendor_data_request(uint8_t PairingRef, profile_id_t ProfileId,
00108 uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu,
00109 uint8_t TxOptions);
00110
00111
00112 #if (!defined RF4CE_CALLBACK_PARAM) || (defined DOXYGEN)
00113
00129 void vendor_data_ind(uint8_t PairingRef, uint16_t VendorId, uint8_t nsduLength,
00130 uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags);
00131
00132
00144 void vendor_data_confirm(nwk_enum_t Status, uint8_t PairingRef, profile_id_t ProfileId
00145 #if (defined NLDE_HANDLE) || (defined DOXYGEN)
00146 , uint8_t Handle
00147 #endif
00148 );
00149 #endif
00150
00158 void vendor_app_alive_req(void);
00159
00160 #endif
00161
00162 #endif