0% found this document useful (0 votes)
2 views66 pages

refman

The document provides detailed documentation for the LibEtherNetIP library, including namespace and class references. It outlines various classes such as CipRequest, CipResponse, and EipCommunication, along with their member functions. The content is structured with indices for easy navigation and access to specific functionalities within the library.

Uploaded by

cangurun1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views66 pages

refman

The document provides detailed documentation for the LibEtherNetIP library, including namespace and class references. It outlines various classes such as CipRequest, CipResponse, and EipCommunication, along with their member functions. The content is structured with indices for easy navigation and access to specific functionalities within the library.

Uploaded by

cangurun1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

LibEtherNetIP

Generated by Doxygen 1.8.13


Contents

1 Namespace Index 1

1.1 Namespace List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

2 Hierarchical Index 3

2.1 Class Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3 Class Index 5

3.1 Class List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

4 Namespace Documentation 7

4.1 LibEtherNetIP Namespace Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

5 Class Documentation 9

5.1 LibEtherNetIP.CipRequest Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.1.1 ClearAllParameters() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

5.1.1.2 serialize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.1.1.3 setService() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2 LibEtherNetIP.CipResponse Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

5.2.1.1 GetResponseData() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.2.1.2 Parse() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5.3 LibEtherNetIP.CommonPacketFormat Class Reference . . . . . . . . . . . . . . . . . . . . . . . 11

5.3.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.3.1.1 AddItem() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
ii CONTENTS

5.3.1.2 ClearAllParameters() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.3.1.3 GetDataByItemIndex() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5.3.1.4 GetDataByItemType() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.3.1.5 Parse() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.3.1.6 serialize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

5.4 LibEtherNetIP.EipCommunication.Connection Class Reference . . . . . . . . . . . . . . . . . . . 14

5.4.1 Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.5 LibEtherNetIP.CyclicConsumer Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5.5.1 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.5.1.1 CyclicConsumer() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.5.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.5.2.1 Dispose() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.5.2.2 SetCallback() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5.5.2.3 ThreadEntry() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.6 LibEtherNetIP.CyclicProducer Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.6.1 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.6.1.1 CyclicProducer() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.6.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.6.2.1 Dispose() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.6.2.2 SetPacketInterval() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.6.2.3 SuspendProduction() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

5.6.2.4 ThreadEntry() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.7 LibEtherNetIP.SimpleScanner.DeviceIdentity Class Reference . . . . . . . . . . . . . . . . . . . . 18

5.8 LibEtherNetIP.EipCommunication Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.8.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.8.1.1 CloseAllConnections() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.8.1.2 CloseIoSocketReceive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.8.1.3 CloseUCMM() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.8.1.4 CreateInboundConnections() . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.8.1.5 CreateIoSocketReceive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Generated by Doxygen
CONTENTS iii

5.8.1.6 CreateIoSocketReceiveMulticast() . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.8.1.7 CreateIoSocketSend() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.8.1.8 GetTimeouts() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5.8.1.9 LeaveMulticastGroup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.1.10 OpenUCMM() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.1.11 receive() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.8.1.12 receiveIO() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.8.1.13 receiveReply() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.8.1.14 send() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.8.1.15 send() [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.8.1.16 sendIO() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.8.1.17 SetTimeouts() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.9 LibEtherNetIP.FileLogging Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.9.1 Constructor & Destructor Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.1.1 FileLogging() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.2.1 Close() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.9.2.2 LogString() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.10 LibEtherNetIP.Helpers Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.10.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.10.1.1 GetAllLocalIPv4() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.10.1.2 hexify() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.10.1.3 IPaddressify() [1/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.10.1.4 IPaddressify() [2/2] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.10.1.5 IPAddresstoUint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

5.10.1.6 IsValidHexChar() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.10.1.7 IsValidHexString() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.10.1.8 MACaddressify() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

5.10.1.9 MessageToHumanReadableString() . . . . . . . . . . . . . . . . . . . . . . . . 31

5.10.1.10 ParseInto() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Generated by Doxygen
iv CONTENTS

5.11 LibEtherNetIP.Messages Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.11.1 Member Enumeration Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

5.11.1.1 Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.11.1.2 TransportClass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.11.1.3 TransportType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.11.1.4 Trigger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.11.2 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

5.11.2.1 BuildNetworkConnectionParametersBitstring() . . . . . . . . . . . . . . . . . . 34

5.11.2.2 BuildTransportClassTriggerBitstring() . . . . . . . . . . . . . . . . . . . . . . . 35

5.11.2.3 CallServiceRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.11.2.4 CallServiceRequest_Connected() . . . . . . . . . . . . . . . . . . . . . . . . . 35

5.11.2.5 CallServiceRequest_Keyed() . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.11.2.6 CipServiceRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

5.11.2.7 CipServiceRequest_Connected() . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.11.2.8 ForwardCloseRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

5.11.2.9 ForwardOpenRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5.11.2.10 ForwardOpenRequest_withSockAddrItem() . . . . . . . . . . . . . . . . . . . . 39

5.11.2.11 GetAttributesAllRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.11.2.12 GetAttributesAllRequest_Connected() . . . . . . . . . . . . . . . . . . . . . . . 40

5.11.2.13 GetAttributesAllRequest_Keyed() . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.11.2.14 GetAttributeSingleRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

5.11.2.15 GetAttributeSingleRequest_Connected() . . . . . . . . . . . . . . . . . . . . . 42

5.11.2.16 GetAttributeSingleRequest_Keyed() . . . . . . . . . . . . . . . . . . . . . . . . 42

5.11.2.17 ListIdentityRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.11.2.18 ListIdentityResponse() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

5.11.2.19 ListServicesReqest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.11.2.20 RegisterSessionRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.11.2.21 SetAttributeSingleRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

5.11.2.22 SetAttributeSingleRequest_Connected() . . . . . . . . . . . . . . . . . . . . . 46

5.11.2.23 SetAttributeSingleRequest_Keyed() . . . . . . . . . . . . . . . . . . . . . . . . 46

Generated by Doxygen
CONTENTS v

5.11.2.24 SwapIntBytes() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.11.2.25 SwapUdintBytes() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.11.2.26 SwapUintBytes() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.11.2.27 UnregisterSessionRequest() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.12 LibEtherNetIP.RequestPath Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.12.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.12.1.1 addAttributeId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.12.1.2 addAttributeIdSegment16Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.12.1.3 addAttributeIdSegment32Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.12.1.4 addAttributeIdSegment8Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.12.1.5 addClassId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.12.1.6 addClassIdSegment16Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.12.1.7 addClassIdSegment32Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.12.1.8 addClassIdSegment8Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.12.1.9 addConnectionPoint() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
5.12.1.10 addConnectionPointSegment16Bit() . . . . . . . . . . . . . . . . . . . . . . . . 52
5.12.1.11 addConnectionPointSegment32Bit() . . . . . . . . . . . . . . . . . . . . . . . . 52
5.12.1.12 addConnectionPointSegment8Bit() . . . . . . . . . . . . . . . . . . . . . . . . 52
5.12.1.13 addElectronicKeySegment() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
5.12.1.14 addInstanceId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.12.1.15 addInstanceIdSegment16Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.12.1.16 addInstanceIdSegment32Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.12.1.17 addInstanceIdSegment8Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.12.1.18 addLogicalSegment() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.12.1.19 addLogicalValue16Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.12.1.20 addLogicalValue32Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.12.1.21 addLogicalValue8Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.12.1.22 addMemberId() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.12.1.23 addMemberIdSegment16Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.12.1.24 addMemberIdSegment32Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.12.1.25 addMemberIdSegment8Bit() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.12.1.26 clearRequestPath() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.12.1.27 getRequestPath() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.12.1.28 getRequestPathLength() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.13 LibEtherNetIP.SimpleScanner Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.14 LibEtherNetIP.StatusCodes Class Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.14.1 Member Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.14.1.1 GetCipExtendedStatusDescription() . . . . . . . . . . . . . . . . . . . . . . . . 56
5.14.1.2 GetCipGeneralStatusDescription() . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.14.1.3 GetEncapsulationStatusDescription() . . . . . . . . . . . . . . . . . . . . . . . 57

Generated by Doxygen
Chapter 1

Namespace Index

1.1 Namespace List

Here is a list of all documented namespaces with brief descriptions:

LibEtherNetIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Namespace Index

Generated by Doxygen
Chapter 2

Hierarchical Index

2.1 Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

LibEtherNetIP.CipResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
LibEtherNetIP.CommonPacketFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
LibEtherNetIP.EipCommunication.Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
LibEtherNetIP.SimpleScanner.DeviceIdentity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
LibEtherNetIP.EipCommunication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
LibEtherNetIP.FileLogging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
LibEtherNetIP.Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
IDisposable
LibEtherNetIP.CyclicConsumer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
LibEtherNetIP.CyclicProducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
LibEtherNetIP.Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
LibEtherNetIP.RequestPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
LibEtherNetIP.CipRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
LibEtherNetIP.SimpleScanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
LibEtherNetIP.StatusCodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4 Hierarchical Index

Generated by Doxygen
Chapter 3

Class Index

3.1 Class List

Here are the classes, structs, unions and interfaces with brief descriptions:

LibEtherNetIP.CipRequest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
LibEtherNetIP.CipResponse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
LibEtherNetIP.CommonPacketFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
LibEtherNetIP.EipCommunication.Connection
A conection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
LibEtherNetIP.CyclicConsumer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
LibEtherNetIP.CyclicProducer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
LibEtherNetIP.SimpleScanner.DeviceIdentity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
LibEtherNetIP.EipCommunication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
LibEtherNetIP.FileLogging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
LibEtherNetIP.Helpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
LibEtherNetIP.Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
LibEtherNetIP.RequestPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
LibEtherNetIP.SimpleScanner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
LibEtherNetIP.StatusCodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6 Class Index

Generated by Doxygen
Chapter 4

Namespace Documentation

4.1 LibEtherNetIP Namespace Reference

Classes

• class CipRequest
• class CipResponse
• class CommonPacketFormat
• class CyclicConsumer
• class CyclicProducer
• class EipCommunication
• class EncapsulationHeader
• class FileLogging
• class Helpers
• class Messages
• class RequestPath
• class Serialize
• class SimpleScanner
• class StatusCodes
8 Namespace Documentation

Generated by Doxygen
Chapter 5

Class Documentation

5.1 LibEtherNetIP.CipRequest Class Reference

Inheritance diagram for LibEtherNetIP.CipRequest:

LibEtherNetIP.RequestPath

LibEtherNetIP.CipRequest

Static Public Member Functions

• static void setService (byte serviceCode)


Set the service code of the CIP request
• static string serialize ()
Serialize the CIP service request into its binary string representation
• static void ClearAllParameters ()
Reset the state of the CipRequest to teh initial state. This allows to start over with a new request (setting new values
& serializing)

Additional Inherited Members

5.1.1 Member Function Documentation

5.1.1.1 ClearAllParameters()

static void LibEtherNetIP.CipRequest.ClearAllParameters ( ) [inline], [static]

Reset the state of the CipRequest to teh initial state. This allows to start over with a new request (setting new values
& serializing)
10 Class Documentation

5.1.1.2 serialize()

static string LibEtherNetIP.CipRequest.serialize ( ) [inline], [static]

Serialize the CIP service request into its binary string representation

Returns

The CIP service reqeust in binary string representation

5.1.1.3 setService()

static void LibEtherNetIP.CipRequest.setService (


byte serviceCode ) [inline], [static]

Set the service code of the CIP request

Parameters

serviceCode

The documentation for this class was generated from the following file:

• CipRequestResponse.cs

5.2 LibEtherNetIP.CipResponse Class Reference

Static Public Member Functions

• static bool Parse (string stream)


From the given binary string, deserialize a CIP service response
• static string GetResponseData ()
After having parsed a binary CIP response, get its payload data as binary string

Static Public Attributes

• static byte reply_service_code = 0


• static byte general_status = 0
• static byte size_of_additional_status = 0
• static ushort [ ] additional_status = null
• static string response_data = ""

5.2.1 Member Function Documentation

Generated by Doxygen
5.3 LibEtherNetIP.CommonPacketFormat Class Reference 11

5.2.1.1 GetResponseData()

static string LibEtherNetIP.CipResponse.GetResponseData ( ) [inline], [static]

After having parsed a binary CIP response, get its payload data as binary string

Returns

5.2.1.2 Parse()

static bool LibEtherNetIP.CipResponse.Parse (


string stream ) [inline], [static]

From the given binary string, deserialize a CIP service response

Parameters

stream The CIP servcei response in binary string representation

Returns

true on success, false otherwise (string too short)

The documentation for this class was generated from the following file:

• CipRequestResponse.cs

5.3 LibEtherNetIP.CommonPacketFormat Class Reference

Static Public Member Functions

• static bool Parse (string stream)


From the given binary string representation of a CPF-formatted message, parse the list of CPF items.
• static string GetDataByItemIndex (int index)
Return the data part (binary string representation) of the item at the given zero-based item index.
• static string GetDataByItemType (ushort typeId)
Return the data part (binary string representation) of the first item with the given item type or null if no such item is
present
• static void ClearAllParameters ()
Reset the object to its initial state by clearing all items. This allows to start over, i.e. add new items and serialize them
into a new message.
• static void AddItem (ushort typeId, ushort lenght, string data)
Add an item with the given item type, length and data.
• static string serialize ()
Serialize the currently contained items into the binary string representation

Generated by Doxygen
12 Class Documentation

5.3.1 Member Function Documentation

5.3.1.1 AddItem()

static void LibEtherNetIP.CommonPacketFormat.AddItem (


ushort typeId,
ushort lenght,
string data ) [inline], [static]

Add an item with the given item type, length and data.

Parameters
type←- Item type
Id
lenght Item data length in bytes
data Item data

5.3.1.2 ClearAllParameters()

static void LibEtherNetIP.CommonPacketFormat.ClearAllParameters ( ) [inline], [static]

Reset the object to its initial state by clearing all items. This allows to start over, i.e. add new items and serialize
them into a new message.

5.3.1.3 GetDataByItemIndex()

static string LibEtherNetIP.CommonPacketFormat.GetDataByItemIndex (


int index ) [inline], [static]

Return the data part (binary string representation) of the item at the given zero-based item index.

Parameters
index Zero-based item index

Returns

Binary string of the data part of the item with the given index or null, if no such item index exists

Generated by Doxygen
5.3 LibEtherNetIP.CommonPacketFormat Class Reference 13

5.3.1.4 GetDataByItemType()

static string LibEtherNetIP.CommonPacketFormat.GetDataByItemType (


ushort typeId ) [inline], [static]

Return the data part (binary string representation) of the first item with the given item type or null if no such item is
present

Parameters

type←- Type Id of the item to retrieve


Id

Returns

Binary string of the data part of the item with the given item type or null, if no such item index exists

5.3.1.5 Parse()

static bool LibEtherNetIP.CommonPacketFormat.Parse (


string stream ) [inline], [static]

From the given binary string representation of a CPF-formatted message, parse the list of CPF items.

Parameters

stream Binary string containing CPF-formatted message

Returns

true on success, false otherwise

5.3.1.6 serialize()

static string LibEtherNetIP.CommonPacketFormat.serialize ( ) [inline], [static]

Serialize the currently contained items into the binary string representation

Returns

The binary string representation of the items in CPF format

The documentation for this class was generated from the following file:

• CommonPacketFormat.cs

Generated by Doxygen
14 Class Documentation

5.4 LibEtherNetIP.EipCommunication.Connection Class Reference

A conection

Public Member Functions

• Connection (Socket socket, bool originator)

Public Attributes

• Socket Socket
• bool Originator
• ulong SeqNo
• uint SessionId

5.4.1 Detailed Description

A conection

The documentation for this class was generated from the following file:

• EipCommunication.cs

5.5 LibEtherNetIP.CyclicConsumer Class Reference

Inheritance diagram for LibEtherNetIP.CyclicConsumer:

IDisposable

LibEtherNetIP.CyclicConsumer

Public Member Functions

• delegate void HandleMessageDelegate (string msg)


• delegate string ReceiveFuncDelegate ()
• CyclicConsumer (ReceiveFuncDelegate receiveFunc, FileLogging logFile, string threadName, Handle←-
MessageDelegate pushReceivedDataCallback)
Create a cyclic consumer instance
• CyclicConsumer (ReceiveFuncDelegate receiveFunc, string threadName, HandleMessageDelegate han-
dler)
• void Dispose ()
Terminate the background thread
• void SetCallback (HandleMessageDelegate pushReceivedDataCallback)
Set a different data reception callback
• void ThreadEntry ()
Consumer thread body

Generated by Doxygen
5.5 LibEtherNetIP.CyclicConsumer Class Reference 15

5.5.1 Constructor & Destructor Documentation

5.5.1.1 CyclicConsumer()

LibEtherNetIP.CyclicConsumer.CyclicConsumer (
ReceiveFuncDelegate receiveFunc,
FileLogging logFile,
string threadName,
HandleMessageDelegate pushReceivedDataCallback ) [inline]

Create a cyclic consumer instance

Parameters

receiveFunc Function to receive data from the network


logFile logFile for diagnostics, can be set to null
threadName Name of the thread as it will appear in the log file
pushReceivedDataCallback Callback for received data, called with each received frame

5.5.2 Member Function Documentation

5.5.2.1 Dispose()

void LibEtherNetIP.CyclicConsumer.Dispose ( ) [inline]

Terminate the background thread

5.5.2.2 SetCallback()

void LibEtherNetIP.CyclicConsumer.SetCallback (
HandleMessageDelegate pushReceivedDataCallback ) [inline]

Set a different data reception callback

Parameters

pushReceivedDataCallback

Generated by Doxygen
16 Class Documentation

5.5.2.3 ThreadEntry()

void LibEtherNetIP.CyclicConsumer.ThreadEntry ( ) [inline]

Consumer thread body

The documentation for this class was generated from the following file:

• CyclicConsumer.cs

5.6 LibEtherNetIP.CyclicProducer Class Reference

Inheritance diagram for LibEtherNetIP.CyclicProducer:

IDisposable

LibEtherNetIP.CyclicProducer

Public Member Functions


• delegate void SendFuncDelegate (string data, string host, int port)
• delegate string BuildMessageDelegate ()
• CyclicProducer (SendFuncDelegate sendFunc, FileLogging logFile, string threadName, BuildMessage←-
Delegate getSendDataCallback, int packet_interval, string targetIp, int port)
Create a cyclic producer instance
• void Dispose ()
Terminate the background thread
• void SetPacketInterval (int packet_interval)
Set the packet interval to a different value
• void SuspendProduction (bool fSuspend)
Pause/unpause the production of frames. Can be used to test timeouts at the target side.
• void ThreadEntry ()
Producer thread body

5.6.1 Constructor & Destructor Documentation

5.6.1.1 CyclicProducer()

LibEtherNetIP.CyclicProducer.CyclicProducer (
SendFuncDelegate sendFunc,
FileLogging logFile,
string threadName,
BuildMessageDelegate getSendDataCallback,
int packet_interval,
string targetIp,
int port ) [inline]

Create a cyclic producer instance

Generated by Doxygen
5.6 LibEtherNetIP.CyclicProducer Class Reference 17

Parameters
sendFunc Function to send data to the network
logFile logfile for diagnostics, can be set to null
threadName thread name as it will appear in the logfile
getSendDataCallback callback to get data to send from the application called with each sent frame
packet_interval Send packet rate in [ms]
targetIp Target IP address in decimal, dotted string representation
port send port number

5.6.2 Member Function Documentation

5.6.2.1 Dispose()

void LibEtherNetIP.CyclicProducer.Dispose ( ) [inline]

Terminate the background thread

5.6.2.2 SetPacketInterval()

void LibEtherNetIP.CyclicProducer.SetPacketInterval (
int packet_interval ) [inline]

Set the packet interval to a different value

Parameters
packet_interval Packet send interval in [ms]

5.6.2.3 SuspendProduction()

void LibEtherNetIP.CyclicProducer.SuspendProduction (
bool fSuspend ) [inline]

Pause/unpause the production of frames. Can be used to test timeouts at the target side.

Parameters

fSuspend

Generated by Doxygen
18 Class Documentation

5.6.2.4 ThreadEntry()

void LibEtherNetIP.CyclicProducer.ThreadEntry ( ) [inline]

Producer thread body

The documentation for this class was generated from the following file:

• CyclicProducer.cs

5.7 LibEtherNetIP.SimpleScanner.DeviceIdentity Class Reference

Public Member Functions

• DeviceIdentity (ushort EncapsulationProtocolVersion, short sin_family, ushort sin_port, uint sin_addr, byte[ ]
sin_zero, ushort VendorId, ushort DeviceType, ushort ProductCode, byte[ ] Revision, ushort Status, uint
SerialNumber, string ProductName, byte State)

Public Attributes

• ushort EncapsulationProtocolVersion
• short sin_family
• ushort sin_port
• uint sin_addr
• byte [ ] sin_zero
• ushort VendorId
• ushort DeviceType
• ushort ProductCode
• byte [ ] Revision
• ushort Status
• uint SerialNumber
• string ProductName
• byte State

The documentation for this class was generated from the following file:

• SimpleScanner.cs

5.8 LibEtherNetIP.EipCommunication Class Reference

Classes

• class Connection
A conection

Generated by Doxygen
5.8 LibEtherNetIP.EipCommunication Class Reference 19

Static Public Member Functions

• static void CreateIoSocketReceive (string local_if, int port)


Create a UDP receive socket bound to the given local interface and port
• static void CreateIoSocketReceiveMulticast (string local_if, string mcast_group, int mcast_port)
Create a UDP multicast receive socket bound to the given local interface and port. IGMP-Join the multicast group
• static void CloseIoSocketReceive ()
Close the previosuly created receive socket (either unicast or multicast)
• static void LeaveMulticastGroup (string local_if, string mcast_group)
Let the given local interface leave the given multicast group (IGMP)
• static void SetTimeouts (uint sendReceiveTo)
Set the send and receive timeout to the given value in [ms]
• static uint GetTimeouts ()
Retrieve the send/receive timeout in [ms]
• static void CreateIoSocketSend (string local_if)
Create a UDP socket and bind it for sending of I/O frames
• static void CreateInboundConnections (string local_if)
Create an UDP socket, bind it to the local interface, set the send/receive timeouts. THis socket will be used to send
and receive non-IO UDP frames, i.e. ListIdentity requests and replies.
• static Connection OpenUCMM (string target_ip)
Open a UCMM connection to the given target IP address and return a handle to it.
• static void CloseAllConnections ()
Close all connections and correspondign sockets
• static void CloseUCMM (ref Connection conn, FileLogging logFile)
Close the given UCMM connection whcih has been opened by a previous call to OpenUCMM().
• static void send (string data, Connection conn)
Send the given binary data over the given connection.
• static void send (string data)
Send the given binary data on the UDP client socket.
• static string receiveReply ()
Blocking receive on the UDP client socket.
• static string receiveIO ()
BLocking receive on the I/O receive socket (can be either unicast or multicast).
• static void sendIO (string data, string host, int port)
Blocking send on the I/O send socket: Send the given data to the given host via the given port.
• static string receive (Connection conn)
BLocking receive on the given connection. If a RegistrSession reply is received, the contained session ID will be
stored with the connection and will be used in all subsequent sends for that connection.

5.8.1 Member Function Documentation

5.8.1.1 CloseAllConnections()

static void LibEtherNetIP.EipCommunication.CloseAllConnections ( ) [inline], [static]

Close all connections and correspondign sockets

Generated by Doxygen
20 Class Documentation

5.8.1.2 CloseIoSocketReceive()

static void LibEtherNetIP.EipCommunication.CloseIoSocketReceive ( ) [inline], [static]

Close the previosuly created receive socket (either unicast or multicast)

5.8.1.3 CloseUCMM()

static void LibEtherNetIP.EipCommunication.CloseUCMM (


ref Connection conn,
FileLogging logFile ) [inline], [static]

Close the given UCMM connection whcih has been opened by a previous call to OpenUCMM().

Parameters

conn Connection to close


logFile log file for diagnostics, can be null

5.8.1.4 CreateInboundConnections()

static void LibEtherNetIP.EipCommunication.CreateInboundConnections (


string local_if ) [inline], [static]

Create an UDP socket, bind it to the local interface, set the send/receive timeouts. THis socket will be used to send
and receive non-IO UDP frames, i.e. ListIdentity requests and replies.

Parameters

local←- Local IPv4 address ind ecimal dotted notation of the network interface to bind to
_if

5.8.1.5 CreateIoSocketReceive()

static void LibEtherNetIP.EipCommunication.CreateIoSocketReceive (


string local_if,
int port ) [inline], [static]

Create a UDP receive socket bound to the given local interface and port

Generated by Doxygen
5.8 LibEtherNetIP.EipCommunication Class Reference 21

Parameters

local←- Local interface IPv4 address in decimal dotted string notation


_if
port port number

5.8.1.6 CreateIoSocketReceiveMulticast()

static void LibEtherNetIP.EipCommunication.CreateIoSocketReceiveMulticast (


string local_if,
string mcast_group,
int mcast_port ) [inline], [static]

Create a UDP multicast receive socket bound to the given local interface and port. IGMP-Join the multicast group

Parameters

local_if Local interface IPv4 address in decimal dotted string notation


mcast_group Multicast group address to join
mcast_port port number

5.8.1.7 CreateIoSocketSend()

static void LibEtherNetIP.EipCommunication.CreateIoSocketSend (


string local_if ) [inline], [static]

Create a UDP socket and bind it for sending of I/O frames

Parameters

local←- Local IPv4 address ind ecimal dotted notation of the network interface to bind to
_if

5.8.1.8 GetTimeouts()

static uint LibEtherNetIP.EipCommunication.GetTimeouts ( ) [inline], [static]

Retrieve the send/receive timeout in [ms]

Returns

Cuurently applicable Send/Receive timeout in [ms]

Generated by Doxygen
22 Class Documentation

5.8.1.9 LeaveMulticastGroup()

static void LibEtherNetIP.EipCommunication.LeaveMulticastGroup (


string local_if,
string mcast_group ) [inline], [static]

Let the given local interface leave the given multicast group (IGMP)

Parameters

local_if Local IPv4 address in decimal dotted notation


mcast_group Multicast group address to leave

5.8.1.10 OpenUCMM()

static Connection LibEtherNetIP.EipCommunication.OpenUCMM (


string target_ip ) [inline], [static]

Open a UCMM connection to the given target IP address and return a handle to it.

Parameters
target←- Target IPv4 address in decimal dotted notation
_ip

Returns

5.8.1.11 receive()

static string LibEtherNetIP.EipCommunication.receive (


Connection conn ) [inline], [static]

BLocking receive on the given connection. If a RegistrSession reply is received, the contained session ID will be
stored with the connection and will be used in all subsequent sends for that connection.

Parameters
conn

Returns

The received data in binary string representation

Generated by Doxygen
5.8 LibEtherNetIP.EipCommunication Class Reference 23

5.8.1.12 receiveIO()

static string LibEtherNetIP.EipCommunication.receiveIO ( ) [inline], [static]

BLocking receive on the I/O receive socket (can be either unicast or multicast).

Returns

The received data in binary string representation

5.8.1.13 receiveReply()

static string LibEtherNetIP.EipCommunication.receiveReply ( ) [inline], [static]

Blocking receive on the UDP client socket.

Returns

The received data in binary string representation

5.8.1.14 send() [1/2]

static void LibEtherNetIP.EipCommunication.send (


string data,
Connection conn ) [inline], [static]

Send the given binary data over the given connection.

Parameters
data Data to send in binary string representation
conn Connection to send the data on

5.8.1.15 send() [2/2]

static void LibEtherNetIP.EipCommunication.send (


string data ) [inline], [static]

Send the given binary data on the UDP client socket.

Generated by Doxygen
24 Class Documentation

Parameters
data Data to send in binary string representation

5.8.1.16 sendIO()

static void LibEtherNetIP.EipCommunication.sendIO (


string data,
string host,
int port ) [inline], [static]

Blocking send on the I/O send socket: Send the given data to the given host via the given port.

Returns

The to be sent data in binary string representation

Parameters
host Peer IPv4 address in decimal dotted notation
port Target port number

5.8.1.17 SetTimeouts()

static void LibEtherNetIP.EipCommunication.SetTimeouts (


uint sendReceiveTo ) [inline], [static]

Set the send and receive timeout to the given value in [ms]

Parameters

sendReceiveTo Send/Receeive timeout to set in [ms]

The documentation for this class was generated from the following file:

• EipCommunication.cs

5.9 LibEtherNetIP.FileLogging Class Reference

Public Member Functions

• FileLogging (string filename)

Generated by Doxygen
5.9 LibEtherNetIP.FileLogging Class Reference 25

Constructor
• void LogString (string line)
Write the given string into the logfile
• void Close ()
Close the logfile

5.9.1 Constructor & Destructor Documentation

5.9.1.1 FileLogging()

LibEtherNetIP.FileLogging.FileLogging (
string filename ) [inline]

Constructor

Parameters

filename Log file (Humand readable text file)

5.9.2 Member Function Documentation

5.9.2.1 Close()

void LibEtherNetIP.FileLogging.Close ( ) [inline]

Close the logfile

5.9.2.2 LogString()

void LibEtherNetIP.FileLogging.LogString (
string line ) [inline]

Write the given string into the logfile

Parameters
line

The documentation for this class was generated from the following file:

Generated by Doxygen
26 Class Documentation

• FileLogging.cs

5.10 LibEtherNetIP.Helpers Class Reference

Static Public Member Functions


• static bool ParseInto (string s, object type, out object value)
Parse from the given string into the given object of the given type
• static string MessageToHumanReadableString (string msg)
Convert the given binary message (bytestream, e.g., as assembled by the Messages module or as received on the
network) into a better-readable, nicely indended, ASCII hex notation.
• static string hexify (int value)
Convert the given integer value into a hex string represenation, prefixed with "0x"
• static string IPaddressify (uint value)
Convert the given IPv4 address into the decimal-dotted string representation
• static string IPaddressify (byte[ ] value)
Convert the IPv4 address in the given byte array into the decimal-dotted string representation
• static uint IPAddresstoUint (string ip)
Convert the given IPv4 address string (decimal, dotted), into the integer representation
• static string MACaddressify (byte[ ] mac)
Assemble a string representation for MAC address in the given byte array
• static string [ ] GetAllLocalIPv4 ()
Return a list of all local IPv4 addresses that are available to be used on this system
• static bool IsValidHexChar (char c)
Test for all valid hex char [0-9, a-f, A-F]
• static bool IsValidHexString (string s)
Test for all valid hex chars in given string [0-9, a-f, A-F]

5.10.1 Member Function Documentation

5.10.1.1 GetAllLocalIPv4()

static string [ ] LibEtherNetIP.Helpers.GetAllLocalIPv4 ( ) [inline], [static]

Return a list of all local IPv4 addresses that are available to be used on this system

Returns

List of strings of IP addresses in decimal dotted notation (e.g. 192.168.1.1)

5.10.1.2 hexify()

static string LibEtherNetIP.Helpers.hexify (


int value ) [inline], [static]

Convert the given integer value into a hex string represenation, prefixed with "0x"

Generated by Doxygen
5.10 LibEtherNetIP.Helpers Class Reference 27

Parameters
value IP address to convert

Returns

String represenation of the given IP

5.10.1.3 IPaddressify() [1/2]

static string LibEtherNetIP.Helpers.IPaddressify (


uint value ) [inline], [static]

Convert the given IPv4 address into the decimal-dotted string representation

Parameters
value IP address to convert

Returns

String represenation of the given IP

5.10.1.4 IPaddressify() [2/2]

static string LibEtherNetIP.Helpers.IPaddressify (


byte [ ] value ) [inline], [static]

Convert the IPv4 address in the given byte array into the decimal-dotted string representation

Parameters
value IP address to convert

Returns

String represenation of the given IP

5.10.1.5 IPAddresstoUint()

static uint LibEtherNetIP.Helpers.IPAddresstoUint (


string ip ) [inline], [static]

Generated by Doxygen
28 Class Documentation

Convert the given IPv4 address string (decimal, dotted), into the integer representation

Generated by Doxygen
5.10 LibEtherNetIP.Helpers Class Reference 29

Parameters

ip String containing a IPv4 address in decimal dotted notation

Returns

The given IP address in integer representation

5.10.1.6 IsValidHexChar()

static bool LibEtherNetIP.Helpers.IsValidHexChar (


char c ) [inline], [static]

Test for all valid hex char [0-9, a-f, A-F]

Parameters

c Character to test

Returns

true if valid hex char, false otherwise

5.10.1.7 IsValidHexString()

static bool LibEtherNetIP.Helpers.IsValidHexString (


string s ) [inline], [static]

Test for all valid hex chars in given string [0-9, a-f, A-F]

Parameters

s String to test

Returns

true if all valid hex chars in string, false otherwise

5.10.1.8 MACaddressify()

static string LibEtherNetIP.Helpers.MACaddressify (


byte [ ] mac ) [inline], [static]

Generated by Doxygen
30 Class Documentation

Assemble a string representation for MAC address in the given byte array

Generated by Doxygen
5.10 LibEtherNetIP.Helpers Class Reference 31

Parameters

mac byte array containing a MAC address

Returns

Huamn readable string represenation of MAC address.

5.10.1.9 MessageToHumanReadableString()

static string LibEtherNetIP.Helpers.MessageToHumanReadableString (


string msg ) [inline], [static]

Convert the given binary message (bytestream, e.g., as assembled by the Messages module or as received on the
network) into a better-readable, nicely indended, ASCII hex notation.

Parameters
msg Message to pretty-print

Returns

Pretty-printed bytestream

5.10.1.10 ParseInto()

static bool LibEtherNetIP.Helpers.ParseInto (


string s,
object type,
out object value ) [inline], [static]

Parse from the given string into the given object of the given type

Parameters

s String to parse from


type Type of the given object
value Object to parse into

Returns

true on success, false otherwise

The documentation for this class was generated from the following file:

• Helpers.cs

Generated by Doxygen
32 Class Documentation

5.11 LibEtherNetIP.Messages Class Reference

Public Types

• enum TransportType { PointToPoint = 0, Multicast = 1, Null = 2 }


Possible transport types to request with a forward open request
• enum Trigger { Cyclic = 0, ChangeOfState = 1, ApplicationTriggered = 2 }
Possible trigger types to request with a forward open request
• enum Priority { Low = 0, High = 1, Scheduled = 2, Urgent = 3 }
Possible priority types to request with a forward open request
• enum TransportClass { Class0 = 0, Class1 = 1, Class2 = 2, Class3 = 3 }
Possible transport classes to request with a forward open request

Public Member Functions

• string RegisterSessionRequest ()
Assemble an Encapsulation Layer RegisterSession request
• string UnregisterSessionRequest ()
Assemble an Encapsulation Layer UnregisterSession request
• string ListIdentityRequest ()
Assemble an Encapsulation Layer ListIdentity request
• string ListServicesReqest ()
Assemble an Encapsulation Layer ListServices request
• byte BuildTransportClassTriggerBitstring (bool isServer, Trigger trigger, TransportClass tclass)
From the given server bit, the transport trigger and the transport class, encode the corresponding bitstring to contain
in the forward open request.
• ushort BuildNetworkConnectionParametersBitstring (bool exclusiveOwner, TransportType ttype, Priority prio,
bool fixedSize, uint size)
From the given exclusive owner bit, the transport type, priority type, the fixed-size bit and the connection size, encode
the corresponding bitstring to contain in the forward open request.
• string ForwardOpenRequest (Trigger trigger, TransportType ttype_ot, TransportType ttype_to, Priority prio←-
_ot, Priority prio_to, uint rate_ot, uint rate_to, uint size_ot, uint size_to, bool isFixedSize_ot, bool isFixed←-
Size_to, bool isExclusiveOwner_ot, bool isExclusiveOwner_to, byte[ ] connectionPath, byte timeoutMultiplier,
TransportClass transportClass, bool isServer, ushort connectionSerialNumber)
Assemble a forward open request from the given parameters
• string ForwardOpenRequest_withSockAddrItem (Trigger trigger, TransportType ttype_ot, TransportType
ttype_to, Priority prio_ot, Priority prio_to, uint rate_ot, uint rate_to, uint size_ot, uint size_to, bool isFixed←-
Size_ot, bool isFixedSize_to, bool isExclusiveOwner_ot, bool isExclusiveOwner_to, byte[ ] connectionPath,
byte timeoutMultiplier, TransportClass transportClass, bool isServer, ushort connectionSerialNumber, ushort
port)
Assemble a forward open request from the given parameters, adding an additinal sockaddr item to tell the target the
port information for I/O frame sending.
• string ForwardCloseRequest (ushort connectionSerialNumber, byte[ ] requestPath)
Assemble a forward close request from the given parameters.
• short SwapIntBytes (short value)
Swap bytes of a CIP INT
• ushort SwapUintBytes (ushort value)
Swap bytes of a CIP UINT
• uint SwapUdintBytes (uint value)
Swap bytes of a CIP UDINT

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 33

• void ListIdentityResponse (string msg, out ushort EncapsulationProtocolVersion, out short sin_family, out
ushort sin_port, out uint sin_addr, out byte[ ] sin_zero, out ushort VendorId, out ushort DeviceType, out ushort
ProductCode, out byte[ ] Revision, out ushort Status, out uint SerialNumber, out string ProductName, out byte
State)
Deserialize a ListIdentity response from the string representation into the given parameters
• string CallServiceRequest_Connected (uint connectionId, ushort sequenceCount, uint classId, uint
instanceId, byte serviceId, string sParamData)
Assemble a "connected" (CL3) service request from the given parameters
• string CallServiceRequest (uint classId, uint instanceId, byte serviceId, string sParamData)
Assemble a "unconnected" (UCMM) service request from the given parameters
• string CallServiceRequest_Keyed (uint classId, uint instanceId, byte serviceId, string sParamData, ushort
vendorId, ushort deviceType, ushort productCode, byte majorRev, byte minorRev, bool fCompatibility)
Assemble a "unconnected" (UCMM) service request with electronic keying from the given parameters
• string SetAttributeSingleRequest_Connected (uint connectionId, ushort sequenceCount, uint classId, uint
instanceId, uint attributeId, string sData)
Assemble a "connected" (CL3) SetAttributeSingle service request from the given parameters
• string SetAttributeSingleRequest (uint classId, uint instanceId, uint attributeId, string sData)
Assemble a "unconnected" (UCMM) SetAttributeSingle service request from the given parameters
• string SetAttributeSingleRequest_Keyed (uint classId, uint instanceId, uint attributeId, string sData, ushort
vendorId, ushort deviceType, ushort productCode, byte majorRev, byte minorRev, bool fCompatibility)
Assemble a "unconnected" (UCMM) SetAttributeSingle service request with electronic keying from the given param-
eters
• string GetAttributeSingleRequest_Connected (uint connectionId, ushort sequenceCount, uint classId, uint
instanceId, uint attributeId)
Assemble a "connected" (CL3) GetAttributeSingle service request from the given parameters
• string GetAttributeSingleRequest (uint classId, uint instanceId, uint attributeId)
Assemble a "unconnected" (UCMM) GetAttributeSingle service request from the given parameters
• string GetAttributeSingleRequest_Keyed (uint classId, uint instanceId, uint attributeId, ushort vendorId, ushort
deviceType, ushort productCode, byte majorRev, byte minorRev, bool fCompatibility)
Assemble a "unconnected" (UCMM) GetAttributeSingle service request with electronic keying from the given param-
eters
• string GetAttributesAllRequest (uint classId, uint instanceId)
Assemble an "unconnected" (UCMM) GetAttributesAll request.
• string GetAttributesAllRequest_Keyed (uint classId, uint instanceId, ushort vendorId, ushort deviceType,
ushort productCode, byte majorRev, byte minorRev, bool fCompatibility)
Assemble an "unconnected" (UCMM) GetAttributesAll request with electronic keying
• string GetAttributesAllRequest_Connected (uint connectionId, ushort sequenceCount, uint classId, uint
instanceId)
Assemble a "connected" (CL3) GetAttributesAll service request from the given parameters
• string CipServiceRequest (byte serviceId, uint classId, uint instanceId, uint attributeId, string sData)
Assemble an "unconnected" (UCMM) CIP service request request from the given parameters
• string CipServiceRequest_Connected (uint connectionId, ushort sequenceCount, byte serviceId, uint classId,
uint instanceId, uint attributeId, string sData)
Assemble an "connected" (CL3) CIP service request request from the given parameters

5.11.1 Member Enumeration Documentation

Generated by Doxygen
34 Class Documentation

5.11.1.1 Priority

enum LibEtherNetIP.Messages.Priority [strong]

Possible priority types to request with a forward open request

5.11.1.2 TransportClass

enum LibEtherNetIP.Messages.TransportClass [strong]

Possible transport classes to request with a forward open request

5.11.1.3 TransportType

enum LibEtherNetIP.Messages.TransportType [strong]

Possible transport types to request with a forward open request

5.11.1.4 Trigger

enum LibEtherNetIP.Messages.Trigger [strong]

Possible trigger types to request with a forward open request

5.11.2 Member Function Documentation

5.11.2.1 BuildNetworkConnectionParametersBitstring()

ushort LibEtherNetIP.Messages.BuildNetworkConnectionParametersBitstring (
bool exclusiveOwner,
TransportType ttype,
Priority prio,
bool fixedSize,
uint size ) [inline]

From the given exclusive owner bit, the transport type, priority type, the fixed-size bit and the connection size,
encode the corresponding bitstring to contain in the forward open request.

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 35

5.11.2.2 BuildTransportClassTriggerBitstring()

byte LibEtherNetIP.Messages.BuildTransportClassTriggerBitstring (
bool isServer,
Trigger trigger,
TransportClass tclass ) [inline]

From the given server bit, the transport trigger and the transport class, encode the corresponding bitstring to contain
in the forward open request.

5.11.2.3 CallServiceRequest()

string LibEtherNetIP.Messages.CallServiceRequest (
uint classId,
uint instanceId,
byte serviceId,
string sParamData ) [inline]

Assemble a "unconnected" (UCMM) service request from the given parameters

Parameters

classId Class ID to encode


instanceId Instance ID to encode
serviceId Service ID to encode
sParamData Data part to encode

Returns

String representation of the assembled request

5.11.2.4 CallServiceRequest_Connected()

string LibEtherNetIP.Messages.CallServiceRequest_Connected (
uint connectionId,
ushort sequenceCount,
uint classId,
uint instanceId,
byte serviceId,
string sParamData ) [inline]

Assemble a "connected" (CL3) service request from the given parameters

Parameters

connectionId Connection ID to encode


sequenceCount Sequence count field to encode (typically incremented with each new frame)
classId Class ID to encode
instanceId
Generated by Doxygen
Instance ID to encode
serviceId Service ID to encode
sParamData Data part to encode
36 Class Documentation

Returns

String representation of the assembled request

5.11.2.5 CallServiceRequest_Keyed()

string LibEtherNetIP.Messages.CallServiceRequest_Keyed (
uint classId,
uint instanceId,
byte serviceId,
string sParamData,
ushort vendorId,
ushort deviceType,
ushort productCode,
byte majorRev,
byte minorRev,
bool fCompatibility ) [inline]

Assemble a "unconnected" (UCMM) service request with electronic keying from the given parameters

Parameters

classId Class ID to encode


instanceId Instance ID to encode
serviceId Service ID to encode
sParamData Data part to encode
vendorId Electronic key vendor ID
deviceType Electronic Key Device Type
productCode Electronic Key product code
majorRev Electronic Key major revision
minorRev Electronic key minor revision
fCompatibility Electronic key compatibility bit

Returns

String representation of the assembled request

5.11.2.6 CipServiceRequest()

string LibEtherNetIP.Messages.CipServiceRequest (
byte serviceId,
uint classId,
uint instanceId,
uint attributeId,
string sData ) [inline]

Assemble an "unconnected" (UCMM) CIP service request request from the given parameters

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 37

Parameters

serviceId Service ID to encode


classId Class ID to encode
instance←- Instance ID to encode
Id
attribute←- Attribute ID to encode
Id
sData Data part to encode

Returns

String representation of the assembled request

5.11.2.7 CipServiceRequest_Connected()

string LibEtherNetIP.Messages.CipServiceRequest_Connected (
uint connectionId,
ushort sequenceCount,
byte serviceId,
uint classId,
uint instanceId,
uint attributeId,
string sData ) [inline]

Assemble an "connected" (CL3) CIP service request request from the given parameters

Parameters

connectionId Connection ID to encode


sequenceCount Sequence count field to encode (typically incremented with each new frame)
serviceId Service ID to encode
classId Class ID to encode
instanceId Instance ID to encode
attributeId Attribute ID to encode
sData Data part to encode

Returns

String representation of the assembled request

5.11.2.8 ForwardCloseRequest()

string LibEtherNetIP.Messages.ForwardCloseRequest (
ushort connectionSerialNumber,
byte [ ] requestPath ) [inline]

Assemble a forward close request from the given parameters.

Generated by Doxygen
38 Class Documentation

Parameters

connectionSerialNumber Serial number of the connection for which to request closing


requestPath Reqest path for the CIp request, typically Message router instance 1 ({ 0x20, 0x02,
0x24, 0x01 })

Returns

String representation of the assembled forward close request

5.11.2.9 ForwardOpenRequest()

string LibEtherNetIP.Messages.ForwardOpenRequest (
Trigger trigger,
TransportType ttype_ot,
TransportType ttype_to,
Priority prio_ot,
Priority prio_to,
uint rate_ot,
uint rate_to,
uint size_ot,
uint size_to,
bool isFixedSize_ot,
bool isFixedSize_to,
bool isExclusiveOwner_ot,
bool isExclusiveOwner_to,
byte [ ] connectionPath,
byte timeoutMultiplier,
TransportClass transportClass,
bool isServer,
ushort connectionSerialNumber ) [inline]

Assemble a forward open request from the given parameters

Parameters

trigger Trigger type for the connection


ttype_ot Transport type for the connection in O->T direction
ttype_to Transport type for the connection in T->O direction
prio_ot Priority type for the connection in O->T direction
prio_to Priority type for the connection in T->O direction
rate_ot Packet interval [ms] for the connection in O->T direction
rate_to Packet interval [ms] for the connection in T->O direction
size_ot Connection size in O->T direction in number of bytes
size_to Connection size in T->O direction in number of bytes
isFixedSize_ot Fixed connection size bit O->T direction
isFixedSize_to Fixed connection size bit T->O direction
isExclusiveOwner_ot Exclusive owner bit O->T direction
isExclusiveOwner_to Exclusive owner bit T->O direction
connectionPath Connection path used to address the connection endpoints in the target

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 39

Parameters

timeoutMultiplier Timeout multiplier, see spec. for mappings betwen values and actual timeout
multipliers
transportClass Transport class of the connection
isServer Server bit to encode in the forward open frame, see spec.
connectionSerialNumber

Returns

String representation of the assembled forward open request

5.11.2.10 ForwardOpenRequest_withSockAddrItem()

string LibEtherNetIP.Messages.ForwardOpenRequest_withSockAddrItem (
Trigger trigger,
TransportType ttype_ot,
TransportType ttype_to,
Priority prio_ot,
Priority prio_to,
uint rate_ot,
uint rate_to,
uint size_ot,
uint size_to,
bool isFixedSize_ot,
bool isFixedSize_to,
bool isExclusiveOwner_ot,
bool isExclusiveOwner_to,
byte [ ] connectionPath,
byte timeoutMultiplier,
TransportClass transportClass,
bool isServer,
ushort connectionSerialNumber,
ushort port ) [inline]

Assemble a forward open request from the given parameters, adding an additinal sockaddr item to tell the target the
port information for I/O frame sending.

Parameters

trigger Trigger type for the connection


ttype_ot Transport type for the connection in O->T direction
ttype_to Transport type for the connection in T->O direction
prio_ot Priority type for the connection in O->T direction
prio_to Priority type for the connection in T->O direction
rate_ot Packet interval [ms] for the connection in O->T direction
rate_to Packet interval [ms] for the connection in T->O direction
size_ot Connection size in O->T direction in number of bytes
size_to Connection size in T->O direction in number of bytes
isFixedSize_ot Fixed connection size bit O->T direction

Generated by Doxygen
40 Class Documentation

Parameters

isFixedSize_to Fixed connection size bit T->O direction


isExclusiveOwner_ot Exclusive owner bit O->T direction
isExclusiveOwner_to Exclusive owner bit T->O direction
connectionPath Connection path used to address the connection endpoints in the target
timeoutMultiplier Timeout multiplier, see spec. for mappings betwen values and actual timeout
multipliers
transportClass Transport class of the connection
isServer Server bit to encode in the forward open frame, see spec.
connectionSerialNumber
port Port numbe rto encode in the socket address item

Returns

String representation of the assembled forward open request

5.11.2.11 GetAttributesAllRequest()

string LibEtherNetIP.Messages.GetAttributesAllRequest (
uint classId,
uint instanceId ) [inline]

Assemble an "unconnected" (UCMM) GetAttributesAll request.

Parameters

classId Class ID to encode


instance←- Instance ID to encode
Id

Returns

String representation of the assembled request

5.11.2.12 GetAttributesAllRequest_Connected()

string LibEtherNetIP.Messages.GetAttributesAllRequest_Connected (
uint connectionId,
ushort sequenceCount,
uint classId,
uint instanceId ) [inline]

Assemble a "connected" (CL3) GetAttributesAll service request from the given parameters

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 41

Parameters

connectionId Connection ID to encode


sequenceCount Sequence count field to encode (typically incremented with each new frame)
classId Class ID to encode
instanceId Instance ID to encode

Returns

String representation of the assembled request

5.11.2.13 GetAttributesAllRequest_Keyed()

string LibEtherNetIP.Messages.GetAttributesAllRequest_Keyed (
uint classId,
uint instanceId,
ushort vendorId,
ushort deviceType,
ushort productCode,
byte majorRev,
byte minorRev,
bool fCompatibility ) [inline]

Assemble an "unconnected" (UCMM) GetAttributesAll request with electronic keying

Parameters

classId Class ID to encode


instanceId Instance ID to encode
vendorId Electronic key vendor ID
deviceType Electronic Key Device Type
productCode Electronic Key product code
majorRev Electronic Key major revision
minorRev Electronic key minor revision
fCompatibility Electronic key compatibility bit

Returns

String representation of the assembled request

5.11.2.14 GetAttributeSingleRequest()

string LibEtherNetIP.Messages.GetAttributeSingleRequest (
uint classId,
uint instanceId,
uint attributeId ) [inline]

Assemble a "unconnected" (UCMM) GetAttributeSingle service request from the given parameters

Generated by Doxygen
42 Class Documentation

Parameters

classId Class ID to encode


instance←- Instance ID to encode
Id
attribute←- Attribute ID to encode
Id

Returns

String representation of the assembled request

5.11.2.15 GetAttributeSingleRequest_Connected()

string LibEtherNetIP.Messages.GetAttributeSingleRequest_Connected (
uint connectionId,
ushort sequenceCount,
uint classId,
uint instanceId,
uint attributeId ) [inline]

Assemble a "connected" (CL3) GetAttributeSingle service request from the given parameters

Parameters

connectionId Connection ID to encode


sequenceCount Sequence count field to encode (typically incremented with each new frame)
classId Class ID to encode
instanceId Instance ID to encode
attributeId Attribute ID to encode

Returns

String representation of the assembled request

5.11.2.16 GetAttributeSingleRequest_Keyed()

string LibEtherNetIP.Messages.GetAttributeSingleRequest_Keyed (
uint classId,
uint instanceId,
uint attributeId,
ushort vendorId,
ushort deviceType,
ushort productCode,
byte majorRev,

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 43

byte minorRev,
bool fCompatibility ) [inline]

Assemble a "unconnected" (UCMM) GetAttributeSingle service request with electronic keying from the given pa-
rameters

Generated by Doxygen
44 Class Documentation

Parameters

classId Class ID to encode


instanceId Instance ID to encode
attributeId Attribute ID to encode
vendorId Electronic key vendor ID
deviceType Electronic Key Device Type
productCode Electronic Key product code
majorRev Electronic Key major revision
minorRev Electronic key minor revision
fCompatibility Electronic key compatibility bit

Returns

String representation of the assembled request

5.11.2.17 ListIdentityRequest()

string LibEtherNetIP.Messages.ListIdentityRequest ( ) [inline]

Assemble an Encapsulation Layer ListIdentity request

Returns

String representation of the request

5.11.2.18 ListIdentityResponse()

void LibEtherNetIP.Messages.ListIdentityResponse (
string msg,
out ushort EncapsulationProtocolVersion,
out short sin_family,
out ushort sin_port,
out uint sin_addr,
out byte [ ] sin_zero,
out ushort VendorId,
out ushort DeviceType,
out ushort ProductCode,
out byte [ ] Revision,
out ushort Status,
out uint SerialNumber,
out string ProductName,
out byte State ) [inline]

Deserialize a ListIdentity response from the string representation into the given parameters

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 45

Parameters
msg ListIdentity response as string
EncapsulationProtocolVersion Decoded Encap. Prot. Version
sin_family Decoded sin_family
sin_port Decoded sin_port
sin_addr Decoded sin_addr
sin_zero Decoded sin_zero
VendorId Decoded vendor ID
DeviceType Decoded device Type
ProductCode Decoded Product code
Revision Decoded revision
Status Decoded status
SerialNumber Decoded serial number
ProductName Decoded product name
State Decoded State

5.11.2.19 ListServicesReqest()

string LibEtherNetIP.Messages.ListServicesReqest ( ) [inline]

Assemble an Encapsulation Layer ListServices request

Returns

String representation of the request

5.11.2.20 RegisterSessionRequest()

string LibEtherNetIP.Messages.RegisterSessionRequest ( ) [inline]

Assemble an Encapsulation Layer RegisterSession request

Returns

String representation of the request

5.11.2.21 SetAttributeSingleRequest()

string LibEtherNetIP.Messages.SetAttributeSingleRequest (
uint classId,
uint instanceId,
uint attributeId,
string sData ) [inline]

Assemble a "unconnected" (UCMM) SetAttributeSingle service request from the given parameters

Generated by Doxygen
46 Class Documentation

Parameters

classId Class ID to encode


instance←- Instance ID to encode
Id
attribute←- Attribute ID to encode
Id
sData Data part to encode

Returns

String representation of the assembled request

5.11.2.22 SetAttributeSingleRequest_Connected()

string LibEtherNetIP.Messages.SetAttributeSingleRequest_Connected (
uint connectionId,
ushort sequenceCount,
uint classId,
uint instanceId,
uint attributeId,
string sData ) [inline]

Assemble a "connected" (CL3) SetAttributeSingle service request from the given parameters

Parameters

connectionId Connection ID to encode


sequenceCount Sequence count field to encode (typically incremented with each new frame)
classId Class ID to encode
instanceId Instance ID to encode
attributeId Attribute ID to encode
sData Data part to encode

Returns

String representation of the assembled request

5.11.2.23 SetAttributeSingleRequest_Keyed()

string LibEtherNetIP.Messages.SetAttributeSingleRequest_Keyed (
uint classId,
uint instanceId,
uint attributeId,
string sData,

Generated by Doxygen
5.11 LibEtherNetIP.Messages Class Reference 47

ushort vendorId,
ushort deviceType,
ushort productCode,
byte majorRev,
byte minorRev,
bool fCompatibility ) [inline]

Assemble a "unconnected" (UCMM) SetAttributeSingle service request with electronic keying from the given pa-
rameters

Parameters

classId Class ID to encode


instanceId Instance ID to encode
attributeId Attribute ID to encode
sData Data part to encode
vendorId Electronic key vendor ID
deviceType Electronic Key Device Type
productCode Electronic Key product code
majorRev Electronic Key major revision
minorRev Electronic key minor revision
fCompatibility Electronic key compatibility bit

Returns

String representation of the assembled request

5.11.2.24 SwapIntBytes()

short LibEtherNetIP.Messages.SwapIntBytes (
short value ) [inline]

Swap bytes of a CIP INT

Parameters
value

Returns

Byte-swapped value

5.11.2.25 SwapUdintBytes()

uint LibEtherNetIP.Messages.SwapUdintBytes (
uint value ) [inline]

Swap bytes of a CIP UDINT

Generated by Doxygen
48 Class Documentation

Parameters
value

Returns

Byte-swapped value

5.11.2.26 SwapUintBytes()

ushort LibEtherNetIP.Messages.SwapUintBytes (
ushort value ) [inline]

Swap bytes of a CIP UINT

Parameters
value

Returns

Byte-swapped value

5.11.2.27 UnregisterSessionRequest()

string LibEtherNetIP.Messages.UnregisterSessionRequest ( ) [inline]

Assemble an Encapsulation Layer UnregisterSession request

Returns

String representation of the request

The documentation for this class was generated from the following file:

• Messages.cs

5.12 LibEtherNetIP.RequestPath Class Reference

Inheritance diagram for LibEtherNetIP.RequestPath:

LibEtherNetIP.RequestPath

LibEtherNetIP.CipRequest

Generated by Doxygen
5.12 LibEtherNetIP.RequestPath Class Reference 49

Static Public Member Functions

• static void addLogicalSegment (byte type_and_format)


Add a logical segment with the given Type/Format byte
• static void addClassIdSegment8Bit ()
Add a logical 8-Bit class ID segment
• static void addClassIdSegment16Bit ()
Add a logical 16-Bit class ID segment
• static void addClassIdSegment32Bit ()
Add a logical 32-Bit class ID segment
• static void addInstanceIdSegment8Bit ()
Add a logical 8-Bit instance ID segment
• static void addInstanceIdSegment16Bit ()
Add a logical 16-Bit instance ID segment
• static void addInstanceIdSegment32Bit ()
Add a logical 32-Bit instance ID segment
• static void addMemberIdSegment8Bit ()
Add a logical 8-Bit member ID segment
• static void addMemberIdSegment16Bit ()
Add a logical 16-Bit member ID segment
• static void addMemberIdSegment32Bit ()
Add a logical 32-Bit member ID segment
• static void addConnectionPointSegment8Bit ()
Add a logical 8-Bit connection point segment
• static void addConnectionPointSegment16Bit ()
Add a logical 16-Bit connection point segment
• static void addConnectionPointSegment32Bit ()
Add a logical 32-Bit connection point segment
• static void addAttributeIdSegment8Bit ()
Add a logical 8-Bit attribute ID segment
• static void addAttributeIdSegment16Bit ()
Add a logical 16-Bit attribute ID segment
• static void addAttributeIdSegment32Bit ()
Add a logical 32-Bit attribute ID segment
• static void addElectronicKeySegment (byte format, string data)
Add a logical electronic key segment
• static void addLogicalValue8Bit (byte value)
Add a logical 8-Bit value segment
• static void addLogicalValue16Bit (ushort value)
Add a logical 16-Bit value segment
• static void addLogicalValue32Bit (uint value)
Add a logical 32-Bit value segment
• static void addClassId (uint classId)
Add the given class ID as logical class ID segemnt of appropriate size
• static void addInstanceId (uint instanceId)
Add the given instance ID as logical class ID segemnt of appropriate size
• static void addMemberId (uint memberId)
Add the given member ID as logical class ID segemnt of appropriate size
• static void addConnectionPoint (uint connectionPoint)
Add the given connection point as logical class ID segment of appropriate size
• static void addAttributeId (uint attributeId)

Generated by Doxygen
50 Class Documentation

Add the given attribute ID point as logical attribute ID segment of appropriate size
• static byte getRequestPathLength ()
Get the current length of the request path, in number of words (each being a multiple of two bytes)
• static string getRequestPath ()
Get the current request path, in its string representation
• static void clearRequestPath ()
Reset the request path which has been built-up so far by adding logical segments. This brings this module back to its
initial state and allows to start over for constructing another request path.

Static Public Attributes

• static string cip_request_path = ""

5.12.1 Member Function Documentation

5.12.1.1 addAttributeId()

static void LibEtherNetIP.RequestPath.addAttributeId (


uint attributeId ) [inline], [static]

Add the given attribute ID point as logical attribute ID segment of appropriate size

Parameters
attribute←- attribute ID value to add
Id

5.12.1.2 addAttributeIdSegment16Bit()

static void LibEtherNetIP.RequestPath.addAttributeIdSegment16Bit ( ) [inline], [static]

Add a logical 16-Bit attribute ID segment

5.12.1.3 addAttributeIdSegment32Bit()

static void LibEtherNetIP.RequestPath.addAttributeIdSegment32Bit ( ) [inline], [static]

Add a logical 32-Bit attribute ID segment

Generated by Doxygen
5.12 LibEtherNetIP.RequestPath Class Reference 51

5.12.1.4 addAttributeIdSegment8Bit()

static void LibEtherNetIP.RequestPath.addAttributeIdSegment8Bit ( ) [inline], [static]

Add a logical 8-Bit attribute ID segment

5.12.1.5 addClassId()

static void LibEtherNetIP.RequestPath.addClassId (


uint classId ) [inline], [static]

Add the given class ID as logical class ID segemnt of appropriate size

Parameters

class←- Class ID value to add


Id

5.12.1.6 addClassIdSegment16Bit()

static void LibEtherNetIP.RequestPath.addClassIdSegment16Bit ( ) [inline], [static]

Add a logical 16-Bit class ID segment

5.12.1.7 addClassIdSegment32Bit()

static void LibEtherNetIP.RequestPath.addClassIdSegment32Bit ( ) [inline], [static]

Add a logical 32-Bit class ID segment

5.12.1.8 addClassIdSegment8Bit()

static void LibEtherNetIP.RequestPath.addClassIdSegment8Bit ( ) [inline], [static]

Add a logical 8-Bit class ID segment

5.12.1.9 addConnectionPoint()

static void LibEtherNetIP.RequestPath.addConnectionPoint (


uint connectionPoint ) [inline], [static]

Add the given connection point as logical class ID segment of appropriate size

Generated by Doxygen
52 Class Documentation

Parameters
connectionPoint connection point value to add

5.12.1.10 addConnectionPointSegment16Bit()

static void LibEtherNetIP.RequestPath.addConnectionPointSegment16Bit ( ) [inline], [static]

Add a logical 16-Bit connection point segment

5.12.1.11 addConnectionPointSegment32Bit()

static void LibEtherNetIP.RequestPath.addConnectionPointSegment32Bit ( ) [inline], [static]

Add a logical 32-Bit connection point segment

5.12.1.12 addConnectionPointSegment8Bit()

static void LibEtherNetIP.RequestPath.addConnectionPointSegment8Bit ( ) [inline], [static]

Add a logical 8-Bit connection point segment

5.12.1.13 addElectronicKeySegment()

static void LibEtherNetIP.RequestPath.addElectronicKeySegment (


byte format,
string data ) [inline], [static]

Add a logical electronic key segment

Parameters

format Format specifier


data Electronic Key

Generated by Doxygen
5.12 LibEtherNetIP.RequestPath Class Reference 53

5.12.1.14 addInstanceId()

static void LibEtherNetIP.RequestPath.addInstanceId (


uint instanceId ) [inline], [static]

Add the given instance ID as logical class ID segemnt of appropriate size

Parameters
instance←- Instance ID value to add
Id

5.12.1.15 addInstanceIdSegment16Bit()

static void LibEtherNetIP.RequestPath.addInstanceIdSegment16Bit ( ) [inline], [static]

Add a logical 16-Bit instance ID segment

5.12.1.16 addInstanceIdSegment32Bit()

static void LibEtherNetIP.RequestPath.addInstanceIdSegment32Bit ( ) [inline], [static]

Add a logical 32-Bit instance ID segment

5.12.1.17 addInstanceIdSegment8Bit()

static void LibEtherNetIP.RequestPath.addInstanceIdSegment8Bit ( ) [inline], [static]

Add a logical 8-Bit instance ID segment

5.12.1.18 addLogicalSegment()

static void LibEtherNetIP.RequestPath.addLogicalSegment (


byte type_and_format ) [inline], [static]

Add a logical segment with the given Type/Format byte

Parameters

type_and_format type and format specifier to encode in the logical segment

Generated by Doxygen
54 Class Documentation

5.12.1.19 addLogicalValue16Bit()

static void LibEtherNetIP.RequestPath.addLogicalValue16Bit (


ushort value ) [inline], [static]

Add a logical 16-Bit value segment

5.12.1.20 addLogicalValue32Bit()

static void LibEtherNetIP.RequestPath.addLogicalValue32Bit (


uint value ) [inline], [static]

Add a logical 32-Bit value segment

5.12.1.21 addLogicalValue8Bit()

static void LibEtherNetIP.RequestPath.addLogicalValue8Bit (


byte value ) [inline], [static]

Add a logical 8-Bit value segment

5.12.1.22 addMemberId()

static void LibEtherNetIP.RequestPath.addMemberId (


uint memberId ) [inline], [static]

Add the given member ID as logical class ID segemnt of appropriate size

Parameters
member←- member ID value to add
Id

5.12.1.23 addMemberIdSegment16Bit()

static void LibEtherNetIP.RequestPath.addMemberIdSegment16Bit ( ) [inline], [static]

Add a logical 16-Bit member ID segment

Generated by Doxygen
5.12 LibEtherNetIP.RequestPath Class Reference 55

5.12.1.24 addMemberIdSegment32Bit()

static void LibEtherNetIP.RequestPath.addMemberIdSegment32Bit ( ) [inline], [static]

Add a logical 32-Bit member ID segment

5.12.1.25 addMemberIdSegment8Bit()

static void LibEtherNetIP.RequestPath.addMemberIdSegment8Bit ( ) [inline], [static]

Add a logical 8-Bit member ID segment

5.12.1.26 clearRequestPath()

static void LibEtherNetIP.RequestPath.clearRequestPath ( ) [inline], [static]

Reset the request path which has been built-up so far by adding logical segments. This brings this module back to
its initial state and allows to start over for constructing another request path.

5.12.1.27 getRequestPath()

static string LibEtherNetIP.RequestPath.getRequestPath ( ) [inline], [static]

Get the current request path, in its string representation

Returns

Request path which has been built up so far (by adding logical segments)

5.12.1.28 getRequestPathLength()

static byte LibEtherNetIP.RequestPath.getRequestPathLength ( ) [inline], [static]

Get the current length of the request path, in number of words (each being a multiple of two bytes)

Returns

Number of words in the request path

The documentation for this class was generated from the following file:

• RequestPath.cs

Generated by Doxygen
56 Class Documentation

5.13 LibEtherNetIP.SimpleScanner Class Reference

Classes

• class DeviceIdentity

Public Member Functions

• List< DeviceIdentity > DiscoverDevices (string localIp, int timeout)

The documentation for this class was generated from the following file:

• SimpleScanner.cs

5.14 LibEtherNetIP.StatusCodes Class Reference

Static Public Member Functions

• static string GetEncapsulationStatusDescription (uint status)


Get a human readable error message for the given CIP Encapsulation status code.
• static string GetCipGeneralStatusDescription (uint status)
Get a human readable error message for the given CIP general status code.
• static string GetCipExtendedStatusDescription (ushort[ ] additional_status)
Get a human readable error message for the given CIP extended status codes.

5.14.1 Member Function Documentation

5.14.1.1 GetCipExtendedStatusDescription()

static string LibEtherNetIP.StatusCodes.GetCipExtendedStatusDescription (


ushort [ ] additional_status ) [inline], [static]

Get a human readable error message for the given CIP extended status codes.

Parameters

status CIP extended status codes

Returns

Error message

Generated by Doxygen
5.14 LibEtherNetIP.StatusCodes Class Reference 57

5.14.1.2 GetCipGeneralStatusDescription()

static string LibEtherNetIP.StatusCodes.GetCipGeneralStatusDescription (


uint status ) [inline], [static]

Get a human readable error message for the given CIP general status code.

Parameters

status CIP general status code

Returns

Error message

5.14.1.3 GetEncapsulationStatusDescription()

static string LibEtherNetIP.StatusCodes.GetEncapsulationStatusDescription (


uint status ) [inline], [static]

Get a human readable error message for the given CIP Encapsulation status code.

Parameters

status Encapsulation Status code

Returns

Error message

The documentation for this class was generated from the following file:

• StatusCodes.cs

Generated by Doxygen
58 Class Documentation

Generated by Doxygen

You might also like