NetSim Source Code Help
Loading...
Searching...
No Matches
CoAP.c File Reference
#include "Application.h"
#include "CoAP.h"
#include "main.h"
#include "Stack.h"
Include dependency graph for CoAP.c:

Go to the source code of this file.

Macros

#define COAP_REQUEST_SIZE   12
 
#define COAP_ACK_SIZE   8
 
#define COAP_ACT_REQUIRED_DEFAULT   TRUE
 
#define COAP_MULTICAST_RESPONSE_DEFAULT   TRUE
 
#define COAP_VARIABLE_RESPONSE_TIME_DEFAULT   5
 
#define COAP_PIGGYBACKED_TIME_DEFAULT   2000
 
#define COAP_ACK_RESPONSE_TIME_DEFAULT   1000
 
#define COAP_ACK_TIMEOUT_DEFAULT   2000
 
#define COAP_ACK_RANDOM_FACTOR_DEFAULT   1.5
 
#define COAP_MAX_RETRANSMIT_DEFAULT   4
 
#define COAP_NSTART_DEFAULT   1
 
#define COAP_DEFAULT_LEISURE_DEFAULT   5
 
#define COAP_PROBING_RATE_DEFAULT   1
 

Functions

int fn_NetSim_Application_ConfigureCOAPTraffic (ptrAPPLICATION_INFO appInfo, void *xmlNetSimNode)
 
void fn_NetSim_Application_COAP_AppIn (ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
 
int fn_NetSim_Application_COAP_Start (ptrAPPLICATION_INFO appInfo, NetSim_EVENTDETAILS *pstruEventDetails)
 
int fn_NetSim_Application_StartCOAPAPP (ptrAPPLICATION_INFO appInfo, double time)
 
int fn_NetSim_Application_COAP_ProcessRequest (ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
 
int fn_NetSim_Application_COAP_Sent_ACK (ptrAPPLICATION_INFO pstruappinfo, NetSim_PACKET *pstruPacket)
 
int fn_NetSim_Application_COAP_Genrate_RequestPacket (ptrAPPLICATION_INFO appInfo, NETSIM_ID nSource, NETSIM_ID nDestination, double time, char *PacketType)
 
int fn_NetSim_Application_COAP_Genrate_Packet (ptrAPPLICATION_INFO pstruappinfo, NETSIM_ID nSourceId, NETSIM_ID nDestinationId, double size, char *PacketType)
 
COAP_Headerfn_NetSim_Application_COAP_CopyHeader (COAP_Header *src)
 
COAP_Headerfn_NetSim_Application_COAP_GenrateHeader (APP_COAP_INFO *info)
 

Macro Definition Documentation

◆ COAP_ACK_RANDOM_FACTOR_DEFAULT

#define COAP_ACK_RANDOM_FACTOR_DEFAULT   1.5

Definition at line 30 of file CoAP.c.

◆ COAP_ACK_RESPONSE_TIME_DEFAULT

#define COAP_ACK_RESPONSE_TIME_DEFAULT   1000

Definition at line 27 of file CoAP.c.

◆ COAP_ACK_SIZE

#define COAP_ACK_SIZE   8

Definition at line 21 of file CoAP.c.

◆ COAP_ACK_TIMEOUT_DEFAULT

#define COAP_ACK_TIMEOUT_DEFAULT   2000

Definition at line 29 of file CoAP.c.

◆ COAP_ACT_REQUIRED_DEFAULT

#define COAP_ACT_REQUIRED_DEFAULT   TRUE

Definition at line 23 of file CoAP.c.

◆ COAP_DEFAULT_LEISURE_DEFAULT

#define COAP_DEFAULT_LEISURE_DEFAULT   5

Definition at line 33 of file CoAP.c.

◆ COAP_MAX_RETRANSMIT_DEFAULT

#define COAP_MAX_RETRANSMIT_DEFAULT   4

Definition at line 31 of file CoAP.c.

◆ COAP_MULTICAST_RESPONSE_DEFAULT

#define COAP_MULTICAST_RESPONSE_DEFAULT   TRUE

Definition at line 24 of file CoAP.c.

◆ COAP_NSTART_DEFAULT

#define COAP_NSTART_DEFAULT   1

Definition at line 32 of file CoAP.c.

◆ COAP_PIGGYBACKED_TIME_DEFAULT

#define COAP_PIGGYBACKED_TIME_DEFAULT   2000

Definition at line 26 of file CoAP.c.

◆ COAP_PROBING_RATE_DEFAULT

#define COAP_PROBING_RATE_DEFAULT   1

Definition at line 34 of file CoAP.c.

◆ COAP_REQUEST_SIZE

#define COAP_REQUEST_SIZE   12

Definition at line 20 of file CoAP.c.

◆ COAP_VARIABLE_RESPONSE_TIME_DEFAULT

#define COAP_VARIABLE_RESPONSE_TIME_DEFAULT   5

Definition at line 25 of file CoAP.c.

Function Documentation

◆ fn_NetSim_Application_COAP_AppIn()

void fn_NetSim_Application_COAP_AppIn ( ptrAPPLICATION_INFO  pstruappinfo,
NetSim_PACKET pstruPacket 
)

Definition at line 99 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Application_COAP_CopyHeader()

COAP_Header * fn_NetSim_Application_COAP_CopyHeader ( COAP_Header src)

Definition at line 379 of file CoAP.c.

◆ fn_NetSim_Application_COAP_Genrate_Packet()

int fn_NetSim_Application_COAP_Genrate_Packet ( ptrAPPLICATION_INFO  pstruappinfo,
NETSIM_ID  nSourceId,
NETSIM_ID  nDestinationId,
double  size,
char *  PacketType 
)

Definition at line 327 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Application_COAP_Genrate_RequestPacket()

int fn_NetSim_Application_COAP_Genrate_RequestPacket ( ptrAPPLICATION_INFO  appInfo,
NETSIM_ID  nSource,
NETSIM_ID  nDestination,
double  time,
char *  PacketType 
)

Definition at line 284 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Application_COAP_GenrateHeader()

COAP_Header * fn_NetSim_Application_COAP_GenrateHeader ( APP_COAP_INFO info)

Definition at line 398 of file CoAP.c.

Here is the caller graph for this function:

◆ fn_NetSim_Application_COAP_ProcessRequest()

int fn_NetSim_Application_COAP_ProcessRequest ( ptrAPPLICATION_INFO  pstruappinfo,
NetSim_PACKET pstruPacket 
)

Definition at line 210 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Application_COAP_Sent_ACK()

int fn_NetSim_Application_COAP_Sent_ACK ( ptrAPPLICATION_INFO  pstruappinfo,
NetSim_PACKET pstruPacket 
)

Definition at line 254 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Application_COAP_Start()

int fn_NetSim_Application_COAP_Start ( ptrAPPLICATION_INFO  appInfo,
NetSim_EVENTDETAILS pstruEventDetails 
)

Definition at line 165 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Application_ConfigureCOAPTraffic()

int fn_NetSim_Application_ConfigureCOAPTraffic ( ptrAPPLICATION_INFO  appInfo,
void *  xmlNetSimNode 
)

Definition at line 37 of file CoAP.c.

Here is the call graph for this function:

◆ fn_NetSim_Application_StartCOAPAPP()

int fn_NetSim_Application_StartCOAPAPP ( ptrAPPLICATION_INFO  appInfo,
double  time 
)

Definition at line 170 of file CoAP.c.

Here is the call graph for this function:
Here is the caller graph for this function: