NetSim Source Code Help
v14.4
All 13 Components
Loading...
Searching...
No Matches
IEEE1609_Interface.h
1
#pragma once
2
/************************************************************************************
3
* Copyright (C) 2023 *
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_IEEE1609_INTERFACE_H_
16
#define _NETSIM_IEEE1609_INTERFACE_H_
17
#ifdef __cplusplus
18
extern
"C"
{
19
#endif
20
typedef
enum
enum_IEEE1609_ChannelType
21
{
22
IEEE1609_ChannelType_CCH,
23
IEEE1609_ChannelType_SCH,
24
IEEE1609_ChannelType_GUARD,
25
}IEEE1609_CHANNEL_TYPE;
26
27
typedef
struct
stru_IEEE1609_Buffer
28
{
29
UINT size;
30
UINT max_size;
31
NetSim_PACKET* head;
32
NetSim_PACKET* tail;
33
}IEEE1609_BUFFER,*PIEEE1609_BUFFER;
34
35
typedef
struct
stru_IEEE1609_Mac_Var
36
{
37
MAC_LAYER_PROTOCOL secondary_protocol;
38
void
* secondary_protocol_var;
39
40
double
dSCH_Time;
41
double
dCCH_Time;
42
double
dGuard_Time;
43
44
struct
stru_Channel_Info
45
{
46
IEEE1609_CHANNEL_TYPE channel_type;
47
IEEE1609_CHANNEL_TYPE prevChannel;
48
double
dStartTime;
49
double
dEndTime;
50
}CHANNEL_INFO;
51
52
IEEE1609_BUFFER buffer[2];
//For CCH and SCH
53
}IEEE1609_MAC_VAR, *PIEEE1609_MAC_VAR;
54
55
#define GET_IEEE1609_MAC_VAR(nDeviceId,nInterfaceId) ((PIEEE1609_MAC_VAR)DEVICE_MACVAR(nDeviceId,nInterfaceId))
56
#define SET_IEEE1609_MAC_VAR(nDeviceId,nInterfaceId,mac) DEVICE_MACVAR(nDeviceId,nInterfaceId) = ((void*)(mac))
57
#define GET_IEEE1609_CURR_MAC_VAR GET_IEEE1609_MAC_VAR(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)
58
59
60
typedef
struct
stru_IEEE1609_Phy_Var
61
{
62
MAC_LAYER_PROTOCOL secondary_protocol;
63
void
* secondary_protocol_var;
64
65
UINT16 nStandardChannel_SCH;
66
double
dFrequency_SCH;
67
UINT16 nStandardChannel_CCH;
68
double
dFrequency_CCH;
69
}IEEE1609_PHY_VAR, *PIEEE1609_PHY_VAR;
70
71
#define GET_IEEE1609_PHY_VAR(nDeviceId,nInterfaceId) ((PIEEE1609_PHY_VAR)DEVICE_PHYVAR(nDeviceId,nInterfaceId))
72
#define SET_IEEE1609_PHY_VAR(nDeviceId,nInterfaceId,phy) DEVICE_PHYVAR(nDeviceId,nInterfaceId) = ((void*)(phy))
73
#define GET_IEEE1609_CURR_PHY_VAR GET_IEEE1609_PHY_VAR(pstruEventDetails->nDeviceId,pstruEventDetails->nInterfaceId)
74
75
76
#ifdef __cplusplus
77
}
78
#endif
79
#endif
//_NETSIM_IEEE1609_INTERFACE_H_
stru_IEEE1609_Buffer
Definition
IEEE1609_Interface.h:28
stru_IEEE1609_Mac_Var::stru_Channel_Info
Definition
IEEE1609_Interface.h:45
stru_IEEE1609_Mac_Var
Definition
IEEE1609_Interface.h:36
stru_IEEE1609_Phy_Var
Definition
IEEE1609_Interface.h:61
ALL
Component 1
Part 4
Include
IEEE1609_Interface.h
Generated by
1.13.2