OpENer - Open Source EtherNet/IP(TM) I/O Target Stack  2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cpf.h File Reference
#include "typedefs.h"
#include "ciptypes.h"
#include "encap.h"
Include dependency graph for cpf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AddressData
 
struct  AddressItem
 
struct  CipCommonPacketFormatData
 A variant of a CPF packet, including item count, one address item, one data item, and two Sockaddr Info items. More...
 
struct  DataItem
 
struct  SocketAddressInfoItem
 CPF Sockaddr Item. More...
 

Enumerations

enum  CipItemId {
  kCipItemIdNullAddress = 0x0000, kCipItemIdListIdentityResponse = 0x000C, kCipItemIdConnectionAddress = 0x00A1, kCipItemIdConnectedDataItem = 0x00B1,
  kCipItemIdUnconnectedDataItem = 0x00B2, kCipItemIdListServiceResponse = 0x0100, kCipItemIdSocketAddressInfoOriginatorToTarget = 0x8000, kCipItemIdSocketAddressInfoTargetToOriginator = 0x8001,
  kCipItemIdSequencedAddressItem = 0x8002
}
 CPF is Common Packet Format CPF packet := <number of items> {<items>} item := <TypeID> <Length> <data> <number of items> := two bytes <TypeID> := two bytes <Length> := two bytes <data> := <the number of bytes specified by Length> More...
 

Functions

int AssembleIOMessage (const CipCommonPacketFormatData *const common_packet_format_data_item, ENIPMessage *const message)
 
int AssembleLinearMessage (const CipMessageRouterResponse *const message_router_response, const CipCommonPacketFormatData *const common_packet_format_data_item, ENIPMessage *const outgoing_message)
 Copy data from message_router_response struct and common_packet_format_data_item into ENIPMessage struct outgoing_message via encapsulation. More...
 
EipStatus CreateCommonPacketFormatStructure (const EipUint8 *data, size_t data_length, CipCommonPacketFormatData *common_packet_format_data)
 Creates Common Packet Format structure out of data. More...
 
int NotifyCommonPacketFormat (EncapsulationData *const received_data, const struct sockaddr *const originator_address, ENIPMessage *const outgoing_message)
 
int NotifyConnectedCommonPacketFormat (const EncapsulationData *const received_data, const struct sockaddr *const originator_address, ENIPMessage *const outgoing_message)
 

Variables

CipCommonPacketFormatData g_common_packet_format_data_item
 Data storage for the any CPF data Currently we are single threaded and need only one CPF at the time. For future extensions towards multithreading maybe more CPF data items may be necessary. More...