NetSim Source Code Help
Loading...
Searching...
No Matches
WSMP.h
Go to the documentation of this file.
1#pragma once
2/************************************************************************************
3* Copyright (C) 2020 *
4* TETCOS, Bangalore. India *
5* *
6* Tetcos owns the intellectual property rights in the Product and its content. *
7* The copying, redistribution, reselling or publication of any or all of the *
8* Product or its content without express prior written consent of Tetcos is *
9* prohibited. Ownership and / or any other right relating to the software and all *
10* intellectual property rights therein shall remain at all times with Tetcos. *
11* *
12* Author: Shashi Kant Suman *
13* *
14* ---------------------------------------------------------------------------------*/
15#ifndef _NETSIM_WSMP_H_
16#define _NETSIM_WSMP_H_
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define WSMP_WSM_MAX_LENGTH_DEFAULT 1400 //Bytes Range 1-2302
22
23#define WSMP_HDR_LEN 11 //Bytes
24
25
26 //As per linux implementation
27 typedef struct wsmp_header
28 {
38 static __inline PWSMP_HDR GET_WSMP_HDR(NetSim_PACKET* packet)
39 {
40 if (packet->pstruTransportData &&
43 else
44 return NULL;
45 }
46 static __inline void SET_WSMP_HDR(NetSim_PACKET* packet, PWSMP_HDR hdr)
47 {
48 if (packet->pstruTransportData)
49 {
52 }
53 }
54
55 typedef struct wsmp_data
56 {
59#define GET_WSMP_DATA(devId) ((PWSMP_DATA)DEVICE_TRXLayer(devId)->TransportProtocolVar)
60#define GET_CURR_WSMP_DATA GET_WSMP_DATA(pstruEventDetails->nDeviceId)
61#define SET_WSMP_DATA(devId,data) (DEVICE_TRXLayer(devId)->TransportProtocolVar=(void*)data)
62
63#ifdef __cplusplus
64}
65#endif
66#endif //_NETSIM_WSMP_H_
#define UINT
Definition: Linux.h:38
#define UINT16
Definition: Linux.h:33
#define UINT8
Definition: Linux.h:31
@ TX_PROTOCOL_WSMP
Definition: Stack.h:182
static __inline PWSMP_HDR GET_WSMP_HDR(NetSim_PACKET *packet)
Definition: WSMP.h:38
static __inline void SET_WSMP_HDR(NetSim_PACKET *packet, PWSMP_HDR hdr)
Definition: WSMP.h:46
struct wsmp_header WSMP_HDR
struct wsmp_data * PWSMP_DATA
struct wsmp_data WSMP_DATA
struct wsmp_header * PWSMP_HDR
TRANSPORT_LAYER_PROTOCOL nTransportProtocol
Definition: Packet.h:186
struct stru_NetSim_Packet_TransportLayer * pstruTransportData
Definition: Packet.h:274
Definition: WSMP.h:56
UINT wsm_max_length
Definition: WSMP.h:57
UINT16 ele_id
Definition: WSMP.h:34
UINT8 tx_power_level[3]
Definition: WSMP.h:33
UINT8 psid
Definition: WSMP.h:30
UINT8 wsm_version
Definition: WSMP.h:29
UINT8 * data
Definition: WSMP.h:36
UINT8 ch_no[3]
Definition: WSMP.h:31
UINT8 wsm_len
Definition: WSMP.h:35
UINT8 data_rate[3]
Definition: WSMP.h:32