OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cipqos.c File Reference
#include "cipqos.h"
#include "opener_user_conf.h"
#include "cipcommon.h"
#include "cipmessagerouter.h"
#include "ciperror.h"
#include "endianconv.h"
#include "cipethernetlink.h"
#include "opener_api.h"
#include "trace.h"
Include dependency graph for cipqos.c:

Go to the source code of this file.

Functions

EipStatus CipQoSInit ()
 
EipStatus GetAttributeSingleQoS (CipInstance *const RESTRICT instance, CipMessageRouterRequest *RESTRICT const message_router_request, CipMessageRouterResponse *RESTRICT const message_router_response, struct sockaddr *originator_address, const int encapsulation_session)
 
CipUsint GetPriorityForSocket (ConnectionObjectPriority priority)
 Initializing the data structures of the TCP/IP interface object. More...
 
void InitializeCipQos (CipClass *class)
 
EipStatus SetAttributeSingleQoS (CipInstance *instance, CipMessageRouterRequest *message_router_request, CipMessageRouterResponse *message_router_response, struct sockaddr *originator_address, const int encapsulation_session)
 

Variables

CipUsint dscp_event = 59
 
CipUsint dscp_explicit = 27
 
CipUsint dscp_general = 47
 
CipUsint dscp_high = 43
 
CipUsint dscp_low = 31
 
CipUsint dscp_scheduled = 47
 
CipUsint dscp_urgent = 55
 
CipUsint q_frames_enable = 0
 

Function Documentation

EipStatus CipQoSInit ( void  )

Definition at line 118 of file cipqos.c.

References CreateCipClass(), dscp_event, dscp_explicit, dscp_general, dscp_high, dscp_low, dscp_scheduled, dscp_urgent, GetAttributeSingleQoS(), GetCipInstance(), InitializeCipQos(), InsertAttribute(), InsertService(), kCipUsint, kEipStatusError, kEipStatusOk, kGetableSingle, kGetAttributeSingle, kNotSetOrGetable, kSetable, kSetAttributeSingle, q_frames_enable, and SetAttributeSingleQoS().

Referenced by CipStackInit().

Here is the call graph for this function:

Here is the caller graph for this function:

EipStatus GetAttributeSingleQoS ( CipInstance *const RESTRICT  instance,
CipMessageRouterRequest *RESTRICT const  message_router_request,
CipMessageRouterResponse *RESTRICT const  message_router_response,
struct sockaddr *  originator_address,
const int  encapsulation_session 
)

Definition at line 29 of file cipqos.c.

References GetAttributeSingle().

Referenced by CipQoSInit().

Here is the call graph for this function:

Here is the caller graph for this function:

CipUsint GetPriorityForSocket ( ConnectionObjectPriority  priority)

Initializing the data structures of the TCP/IP interface object.

Definition at line 91 of file cipqos.c.

References dscp_explicit, dscp_high, dscp_low, dscp_scheduled, dscp_urgent, kConnectionObjectPriorityHigh, kConnectionObjectPriorityLow, kConnectionObjectPriorityScheduled, and kConnectionObjectPriorityUrgent.

Referenced by CheckAndHandleTcpListenerSocket(), and CreateUdpSocket().

Here is the caller graph for this function:

void InitializeCipQos ( CipClass class)

Definition at line 114 of file cipqos.c.

References cip_instance::cip_class, and cip_class::class_instance.

Referenced by CipQoSInit().

Here is the caller graph for this function:

EipStatus SetAttributeSingleQoS ( CipInstance instance,
CipMessageRouterRequest message_router_request,
CipMessageRouterResponse message_router_response,
struct sockaddr *  originator_address,
const int  encapsulation_session 
)

Definition at line 41 of file cipqos.c.

References CipEpath::attribute_number, CalculateIndex(), cip_instance::cip_class, CipMessageRouterRequest::data, CipAttributeStruct::data, CipMessageRouterResponse::data_length, CipMessageRouterResponse::general_status, GetCipAttribute(), GetDintFromMessage(), kCipErrorAttributeNotSupported, kCipErrorInvalidAttributeValue, kCipErrorNotEnoughData, kCipErrorSuccess, kEipStatusOkSend, OPENER_TRACE_INFO, CipMessageRouterResponse::reply_service, CipMessageRouterRequest::request_path, CipMessageRouterRequest::service, cip_class::set_bit_mask, and CipMessageRouterResponse::size_of_additional_status.

Referenced by CipQoSInit().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

CipUsint dscp_event = 59

DSCP value for event messages

Definition at line 19 of file cipqos.c.

Referenced by CipQoSInit().

CipUsint dscp_explicit = 27

DSCP value for CIP explicit messages (transport class 2/3 and UCMM) and all other EtherNet/IP encapsulation messages

Definition at line 25 of file cipqos.c.

Referenced by CipQoSInit(), and GetPriorityForSocket().

CipUsint dscp_general = 47

DSCP value for general messages

Definition at line 20 of file cipqos.c.

Referenced by CipQoSInit().

CipUsint dscp_high = 43

DSCP value for CIP transport class 0/1 High priority messages

Definition at line 23 of file cipqos.c.

Referenced by CipQoSInit(), and GetPriorityForSocket().

CipUsint dscp_low = 31

DSCP value for CIP transport class 0/1 low priority messages

Definition at line 24 of file cipqos.c.

Referenced by CipQoSInit(), and GetPriorityForSocket().

CipUsint dscp_scheduled = 47

DSCP value for CIP transport class 0/1 Scheduled priority messages

Definition at line 22 of file cipqos.c.

Referenced by CipQoSInit(), and GetPriorityForSocket().

CipUsint dscp_urgent = 55

DSCP value for CIP transport class 0/1 Urgent priority messages

Definition at line 21 of file cipqos.c.

Referenced by CipQoSInit(), and GetPriorityForSocket().

CipUsint q_frames_enable = 0

Enables or disable sending 802.1Q frames on CIP and IEEE 1588 messages

Definition at line 18 of file cipqos.c.

Referenced by CipQoSInit().