소스 검색

Moves enums from ciptypes to cipepath

Martin Melik Merkumians 9 년 전
부모
커밋
006dbb708b
2개의 변경된 파일108개의 추가작업 그리고 115개의 파일을 삭제
  1. 67 9
      source/src/cip/cipepath.h
  2. 41 106
      source/src/cip/ciptypes.h

+ 67 - 9
source/src/cip/cipepath.h

@@ -51,6 +51,71 @@
 #define NETWORK_SEGMENT_SUBTYPE_PRODUCTION_INHIBIT_TIME_IN_MICROSECONDS 0x10 /**< Message value indicating a network segment PIT in microseconds message */
 #define NETWORK_SEGMENT_SUBTYPE_PRODUCTION_INHIBIT_TIME_IN_MICROSECONDS 0x10 /**< Message value indicating a network segment PIT in microseconds message */
 #define NETWORK_SEGMENT_SUBTYPE_EXTENDED_NETWORK 0x1F /**< Message indicating a network message extended network message */
 #define NETWORK_SEGMENT_SUBTYPE_EXTENDED_NETWORK 0x1F /**< Message indicating a network message extended network message */
 
 
+/** @brief Segment type Enum
+ *
+ * Bits 7-5 in the Segment Type/Format byte
+ *
+ */
+typedef enum segment_type {
+  /* Segments */
+  kSegmentTypePortSegment, /**< Port segment */
+  kSegmentTypeLogicalSegment, /**< Logical segment */
+  kSegmentTypeNetworkSegment, /**< Network segment */
+  kSegmentTypeSymbolicSegment, /**< Symbolic segment */
+  kSegmentTypeDataSegment, /**< Data segment */
+  kSegmentTypeDataTypeConstructed, /**< Data type constructed */
+  kSegmentTypeDataTypeElementary, /**< Data type elementary */
+  kSegmentTypeReserved /**< Reserved segment type */
+} SegmentType;
+
+/** @brief Port Segment flags */
+typedef enum port_segment_type {
+  kPortSegmentFlagExtendedLinkAddressSize = 0x10 /**< Extended Link Address Size flag, Port segment */
+} PortSegmentFlag;
+
+/** @brief Enum containing values which kind of logical segment is encoded */
+typedef enum logical_segment_type {
+  kLogicalSegmentLogicalTypeClassId, /**< Class ID */
+  kLogicalSegmentLogicalTypeInstanceId, /**< Instance ID */
+  kLogicalSegmentLogicalTypeMemberId, /**< Member ID */
+  kLogicalSegmentLogicalTypeConnectionPoint, /**< Connection Point */
+  kLogicalSegmentLogicalTypeAttributeId, /**< Attribute ID */
+  kLogicalSegmentLogicalTypeSpecial, /**< Special */
+  kLogicalSegmentLogicalTypeServiceId, /**< Service ID */
+  kLogicalSegmentLogicalTypeExtendedLogical /**< Extended Logical */
+} LogicalSegmentLogicalType;
+
+typedef enum logical_segment_extended_logical_type {
+  kLogicalSegmentExtendedLogicalTypeReserved,
+  kLogicalSegmentExtendedLogicalTypeArrayIndex,
+  kLogicalSegmentExtendedLogicalTypeIndirectArrayIndex,
+  kLogicalSegmentExtendedLogicalTypeBitIndex,
+  kLogicalSegmentExtendedLogicalTypeIndirectBitIndex,
+  kLogicalSegmentExtendedLogicalTypeStructureMemberNumber,
+  kLogicalSegmentExtendedLogicalTypeStructureMemberHandle
+} LogicalSegmentExtendedLogicalType;
+
+/** @brief Enum containing values how long the encoded value will be (8, 16, or
+ * 32 bit) */
+typedef enum logical_segment_logical_format {
+  kLogicalSegmentLogicalFormatEightBit,
+  kLogicalSegmentLogicalFormatSixteenBit,
+  kLogicalSegmentLogicalFormatThirtyTwoBit
+} LogicalSegmentLogicalFormat;
+
+typedef enum logical_segment_special_type_logical_format {
+  kLogicalSegmentSpecialTypeLogicalFormatReserved,
+  kLogicalSegmentSpecialTypeLogicalFormatElectronicKey
+} LogicalSegmentSpecialTypeLogicalFormat;
+
+/** @brief Electronic key formats
+ *
+ */
+typedef enum electronic_key_segment_format {
+  kElectronicKeySegmentFormatReserved, /**< Reserved */
+  kElectronicKeySegmentFormatKeyFormat4 /**< Electronic key format 4 key */
+} ElectronicKeySegmentFormat;
+
 /** @brief All types of network segment types for the use in all code
 /** @brief All types of network segment types for the use in all code
  *
  *
  *  Enum constants for the different network segment subtypes to decouple code from the actual needed message values
  *  Enum constants for the different network segment subtypes to decouple code from the actual needed message values
@@ -65,14 +130,6 @@ typedef enum network_segment_subtype {
   kNetworkSegmentSubtypeExtendedNetworkSegment /**< Extended network segment */
   kNetworkSegmentSubtypeExtendedNetworkSegment /**< Extended network segment */
 } NetworkSegmentSubtype;
 } NetworkSegmentSubtype;
 
 
-/** @brief Electronic key formats
- *
- */
-typedef enum electronic_key_segment_format {
-  kElectronicKeySegmentFormatReserved, /**< Reserved */
-  kElectronicKeySegmentFormatKeyFormat4 /**< Electronic key format 4 key */
-} ElectronicKeySegmentFormat;
-
 /** @brief Data segment sub types
 /** @brief Data segment sub types
  *
  *
  */
  */
@@ -245,7 +302,8 @@ CipUdint GetPathNetworkSegmentProductionInhibitTimeInMicroseconds(
  * @param cip_path The start of the EPath message
  * @param cip_path The start of the EPath message
  * @return The Data Segment subtype
  * @return The Data Segment subtype
  */
  */
-DataSegmentSubtype GetPathDataSegmentSubtype(const unsigned char *const cip_path);
+DataSegmentSubtype GetPathDataSegmentSubtype(
+  const unsigned char *const cip_path);
 
 
 /** @brief Gets the data word length of a Simple Data segment
 /** @brief Gets the data word length of a Simple Data segment
  *
  *

+ 41 - 106
source/src/cip/ciptypes.h

@@ -8,72 +8,6 @@
 
 
 #include "typedefs.h"
 #include "typedefs.h"
 
 
-/** @brief Segment type Enum
- *
- * Bits 7-5 in the Segment Type/Format byte
- *
- */
-typedef enum {
-  /* Segments */
-  kSegmentTypePortSegment, /**< Port segment */
-  kSegmentTypeLogicalSegment, /**< Logical segment */
-  kSegmentTypeNetworkSegment, /**< Network segment */
-  kSegmentTypeSymbolicSegment, /**< Symbolic segment */
-  kSegmentTypeDataSegment, /**< Data segment */
-  kSegmentTypeDataTypeConstructed, /**< Data type constructed */
-  kSegmentTypeDataTypeElementary, /**< Data type elementary */
-  kSegmentTypeReserved /**< Reserved segment type */
-} SegmentType;
-
-/** @brief Port Segment flags */
-typedef enum {
-  kPortSegmentFlagExtendedLinkAddressSize = 0x10 /**< Extended Link Address Size flag, Port segment */
-} PortSegmentFlag;
-
-/** @brief Enum containing values which kind of logical segment is encoded */
-typedef enum {
-  kLogicalSegmentLogicalTypeClassId, /**< Class ID */
-  kLogicalSegmentLogicalTypeInstanceId, /**< Instance ID */
-  kLogicalSegmentLogicalTypeMemberId, /**< Member ID */
-  kLogicalSegmentLogicalTypeConnectionPoint, /**< Connection Point */
-  kLogicalSegmentLogicalTypeAttributeId, /**< Attribute ID */
-  kLogicalSegmentLogicalTypeSpecial, /**< Special */
-  kLogicalSegmentLogicalTypeServiceId, /**< Service ID */
-  kLogicalSegmentLogicalTypeExtendedLogical /**< Extended Logical */
-} LogicalSegmentLogicalType;
-
-typedef enum {
-  kLogicalSegmentExtendedLogicalTypeReserved,
-  kLogicalSegmentExtendedLogicalTypeArrayIndex,
-  kLogicalSegmentExtendedLogicalTypeIndirectArrayIndex,
-  kLogicalSegmentExtendedLogicalTypeBitIndex,
-  kLogicalSegmentExtendedLogicalTypeIndirectBitIndex,
-  kLogicalSegmentExtendedLogicalTypeStructureMemberNumber,
-  kLogicalSegmentExtendedLogicalTypeStructureMemberHandle
-} LogicalSegmentExtendedLogicalType;
-
-/** @brief Enum containing values how long the encoded value will be (8, 16, or
- * 32 bit) */
-typedef enum {
-  kLogicalSegmentLogicalFormatEightBit,
-  kLogicalSegmentLogicalFormatSixteenBit,
-  kLogicalSegmentLogicalFormatThirtyTwoBit
-} LogicalSegmentLogicalFormat;
-
-typedef enum {
-  kLogicalSegmentSpecialTypeLogicalFormatReserved,
-  kLogicalSegmentSpecialTypeLogicalFormatElectronicKey
-} LogicalSegmentSpecialTypeLogicalFormat;
-
-typedef enum {
-  kProductionTimeInhibitTimeNetworkSegment = 0x43 /**< identifier indicating a production inhibit time network segment */
-} NetworkSegmentSubType;
-
-typedef enum {
-  kDataSegmentTypeSimpleDataMessage = kSegmentTypeDataSegment + 0x00,
-  kDataSegmentTypeAnsiExtendedSymbolMessage = kSegmentTypeDataSegment + 0x11
-} DataSegmentType;
-
 /** @brief Enum containing the encoding values for CIP data types for CIP
 /** @brief Enum containing the encoding values for CIP data types for CIP
  * Messages */
  * Messages */
 typedef enum cip_data_types {
 typedef enum cip_data_types {
@@ -104,7 +38,7 @@ typedef enum cip_data_types {
   kCipItime = 0xD8, /**< Duration in milli-seconds, short; range of INT*/
   kCipItime = 0xD8, /**< Duration in milli-seconds, short; range of INT*/
   kCipStringN = 0xD9, /**< Character string, N byte per character */
   kCipStringN = 0xD9, /**< Character string, N byte per character */
   kCipShortString = 0xDA, /**< Character string, 1 byte per character, 1 byte
   kCipShortString = 0xDA, /**< Character string, 1 byte per character, 1 byte
-   length indicator */
+                             length indicator */
   kCipTime = 0xDB, /**< Duration in milli-seconds; range of DINT */
   kCipTime = 0xDB, /**< Duration in milli-seconds; range of DINT */
   kCipEpath = 0xDC, /**< CIP path segments*/
   kCipEpath = 0xDC, /**< CIP path segments*/
   kCipEngUnit = 0xDD, /**< Engineering Units*/
   kCipEngUnit = 0xDD, /**< Engineering Units*/
@@ -113,18 +47,18 @@ typedef enum cip_data_types {
   /* TODO: Check these codes */
   /* TODO: Check these codes */
   kCipUsintUsint = 0xA0, /**< Used for CIP Identity attribute 4 Revision*/
   kCipUsintUsint = 0xA0, /**< Used for CIP Identity attribute 4 Revision*/
   kCipUdintUdintUdintUdintUdintString = 0xA1, /**< TCP/IP attribute 5 - IP address, subnet mask, gateway, IP name
   kCipUdintUdintUdintUdintUdintString = 0xA1, /**< TCP/IP attribute 5 - IP address, subnet mask, gateway, IP name
-   server 1, IP name server 2, domain name*/
+                                                 server 1, IP name server 2, domain name*/
   kCip6Usint = 0xA2, /**< Struct for MAC Address (six USINTs)*/
   kCip6Usint = 0xA2, /**< Struct for MAC Address (six USINTs)*/
   kCipMemberList = 0xA3, /**< */
   kCipMemberList = 0xA3, /**< */
   kCipByteArray = 0xA4, /**< */
   kCipByteArray = 0xA4, /**< */
   kInternalUint6 = 0xF0 /**< bogus hack, for port class attribute 9, TODO
   kInternalUint6 = 0xF0 /**< bogus hack, for port class attribute 9, TODO
-   figure out the right way to handle it */
+                           figure out the right way to handle it */
 } CipDataType;
 } CipDataType;
 
 
 /** @brief Definition of CIP service codes
 /** @brief Definition of CIP service codes
  *
  *
  * An Enum with all CIP service codes. Common services codes range from 0x01 to
  * An Enum with all CIP service codes. Common services codes range from 0x01 to
- *0x1C
+ **0x1C
  *
  *
  */
  */
 typedef enum {
 typedef enum {
@@ -208,7 +142,7 @@ typedef struct {
 typedef struct {
 typedef struct {
   EipUint8 path_size;
   EipUint8 path_size;
   /**< Size of the Path in 16-bit words *//* TODO: Fix, should be UINT
   /**< Size of the Path in 16-bit words *//* TODO: Fix, should be UINT
-   (EIP_UINT16) */
+     (EIP_UINT16) */
   EipUint16 class_id; /**< Class ID of the linked object */
   EipUint16 class_id; /**< Class ID of the linked object */
   EipUint16 instance_number; /**< Requested Instance Number of the linked object */
   EipUint16 instance_number; /**< Requested Instance Number of the linked object */
   EipUint16 attribute_number; /**< Requested Attribute Number of the linked object */
   EipUint16 attribute_number; /**< Requested Attribute Number of the linked object */
@@ -220,7 +154,7 @@ typedef struct {
 typedef struct {
 typedef struct {
   EipUint8 path_size;
   EipUint8 path_size;
   /**< Size of the Path in 16-bit words *//* TODO: Fix, should be UINT
   /**< Size of the Path in 16-bit words *//* TODO: Fix, should be UINT
-   (EIP_UINT16) */
+     (EIP_UINT16) */
   EipUint32 class_id; /**< Class ID of the linked object */
   EipUint32 class_id; /**< Class ID of the linked object */
   EipUint32 connection_point[3]; /* TODO:  Why array length 3? */
   EipUint32 connection_point[3]; /* TODO:  Why array length 3? */
   EipUint8 data_segment;
   EipUint8 data_segment;
@@ -235,7 +169,7 @@ typedef struct {
   CipUint device_type; /**< Device Type */
   CipUint device_type; /**< Device Type */
   CipUint product_code; /**< Product Code */
   CipUint product_code; /**< Product Code */
   CipByte major_revision; /**< Major Revision and Compatibility (Bit 0-6 = Major
   CipByte major_revision; /**< Major Revision and Compatibility (Bit 0-6 = Major
-   Revision) Bit 7 = Compatibility */
+                             Revision) Bit 7 = Compatibility */
   CipUsint minor_revision; /**< Minor Revision */
   CipUsint minor_revision; /**< Minor Revision */
 } CipKeyData;
 } CipKeyData;
 
 
@@ -251,9 +185,9 @@ typedef struct {
 typedef struct {
 typedef struct {
   CipUsint segment_type; /**< Specifies the Segment Type */
   CipUsint segment_type; /**< Specifies the Segment Type */
   CipUsint key_format; /**< Key Format 0-3 reserved, 4 = see Key Format Table,
   CipUsint key_format; /**< Key Format 0-3 reserved, 4 = see Key Format Table,
-   5-255 = Reserved */
+                          5-255 = Reserved */
   CipKeyData key_data; /**< Depends on key format used, usually Key Format 4 as
   CipKeyData key_data; /**< Depends on key format used, usually Key Format 4 as
-   specified in CIP Specification, Volume 1*/
+                          specified in CIP Specification, Volume 1*/
 } CipElectronicKey;
 } CipElectronicKey;
 
 
 /** @brief CIP Message Router Request
 /** @brief CIP Message Router Request
@@ -273,26 +207,26 @@ typedef struct {
  */
  */
 typedef struct {
 typedef struct {
   CipUsint reply_service; /**< Reply service code, the requested service code +
   CipUsint reply_service; /**< Reply service code, the requested service code +
-   0x80 */
+                             0x80 */
   CipOctet reserved; /**< Reserved; Shall be zero */
   CipOctet reserved; /**< Reserved; Shall be zero */
   CipUsint general_status; /**< One of the General Status codes listed in CIP
   CipUsint general_status; /**< One of the General Status codes listed in CIP
-   Specification Volume 1, Appendix B */
+                              Specification Volume 1, Appendix B */
   CipUsint size_of_additional_status; /**< Number of additional 16 bit words in
   CipUsint size_of_additional_status; /**< Number of additional 16 bit words in
-   Additional Status Array */
+                                         Additional Status Array */
   EipUint16 additional_status[MAX_SIZE_OF_ADD_STATUS]; /**< Array of 16 bit words; Additional status;
   EipUint16 additional_status[MAX_SIZE_OF_ADD_STATUS]; /**< Array of 16 bit words; Additional status;
-   If SizeOfAdditionalStatus is 0. there is no
-   Additional Status */
+                                                          If SizeOfAdditionalStatus is 0. there is no
+                                                          Additional Status */
   EipInt16 data_length; /**< Supportative non-CIP variable, gives length of data segment */
   EipInt16 data_length; /**< Supportative non-CIP variable, gives length of data segment */
   CipOctet *data; /**< Array of octet; Response data per object definition from
   CipOctet *data; /**< Array of octet; Response data per object definition from
-   request */
+                     request */
 } CipMessageRouterResponse;
 } CipMessageRouterResponse;
 
 
 typedef struct {
 typedef struct {
   EipUint16 attribute_number;
   EipUint16 attribute_number;
   EipUint8 type;
   EipUint8 type;
   CIPAttributeFlag attribute_flags; /*< 0 => getable_all, 1 => getable_single; 2 =>
   CIPAttributeFlag attribute_flags; /*< 0 => getable_all, 1 => getable_single; 2 =>
-   setable_single; 3 => get and setable; all other
-   values reserved */
+                                       setable_single; 3 => get and setable; all other
+                                       values reserved */
   void *data;
   void *data;
 } CipAttributeStruct;
 } CipAttributeStruct;
 
 
@@ -302,10 +236,10 @@ typedef struct {
 typedef struct cip_instance {
 typedef struct cip_instance {
   EipUint32 instance_number; /**< this instance's number (unique within the class) */
   EipUint32 instance_number; /**< this instance's number (unique within the class) */
   CipAttributeStruct *attributes; /**< pointer to an array of attributes which
   CipAttributeStruct *attributes; /**< pointer to an array of attributes which
-   is unique to this instance */
+                                     is unique to this instance */
   struct cip_class *cip_class; /**< class the instance belongs to */
   struct cip_class *cip_class; /**< class the instance belongs to */
   struct cip_instance *next; /**< next instance, all instances of a class live
   struct cip_instance *next; /**< next instance, all instances of a class live
-   in a linked list */
+                                in a linked list */
 } CipInstance;
 } CipInstance;
 
 
 /** @brief Class is a subclass of Instance */
 /** @brief Class is a subclass of Instance */
@@ -315,13 +249,13 @@ typedef struct cip_class {
   EipUint32 class_id; /**< class ID */
   EipUint32 class_id; /**< class ID */
   EipUint16 revision; /**< class revision*/
   EipUint16 revision; /**< class revision*/
   EipUint16 number_of_instances; /**< number of instances in the class (not
   EipUint16 number_of_instances; /**< number of instances in the class (not
-   including instance 0)*/
+                                    including instance 0)*/
   EipUint16 number_of_attributes; /**< number of attributes of each instance*/
   EipUint16 number_of_attributes; /**< number of attributes of each instance*/
   EipUint16 highest_attribute_number; /**< highest defined attribute number
   EipUint16 highest_attribute_number; /**< highest defined attribute number
-   (attribute numbers are not necessarily
-   consecutive)*/
+                                         (attribute numbers are not necessarily
+                                         consecutive)*/
   EipUint32 get_attribute_all_mask; /**< mask indicating which attributes are
   EipUint32 get_attribute_all_mask; /**< mask indicating which attributes are
-   returned by getAttributeAll*/
+                                       returned by getAttributeAll*/
   EipUint16 number_of_services; /**< number of services supported*/
   EipUint16 number_of_services; /**< number of services supported*/
   CipInstance *instances; /**< pointer to the list of instances*/
   CipInstance *instances; /**< pointer to the list of instances*/
   struct cip_service_struct *services; /**< pointer to the array of services*/
   struct cip_service_struct *services; /**< pointer to the array of services*/
@@ -330,22 +264,23 @@ typedef struct cip_class {
 
 
 /** @ingroup CIP_API
 /** @ingroup CIP_API
  *  @typedef  EIP_STATUS (*TCIPServiceFunc)(S_CIP_Instance *pa_pstInstance,
  *  @typedef  EIP_STATUS (*TCIPServiceFunc)(S_CIP_Instance *pa_pstInstance,
- *S_CIP_MR_Request *pa_MRRequest, S_CIP_MR_Response *pa_MRResponse)
+ **S_CIP_MR_Request *pa_MRRequest, S_CIP_MR_Response *pa_MRResponse)
  *  @brief Signature definition for the implementation of CIP services.
  *  @brief Signature definition for the implementation of CIP services.
  *
  *
  *  CIP services have to follow this signature in order to be handled correctly
  *  CIP services have to follow this signature in order to be handled correctly
- *by the stack.
+ **by the stack.
  *  @param pa_pstInstance the instance which was referenced in the service
  *  @param pa_pstInstance the instance which was referenced in the service
- *request
+ **request
  *  @param pa_MRRequest request data
  *  @param pa_MRRequest request data
  *  @param pa_MRResponse storage for the response data, including a buffer for
  *  @param pa_MRResponse storage for the response data, including a buffer for
- *extended data
+ **extended data
  *  @return EIP_OK_SEND if service could be executed successfully and a response
  *  @return EIP_OK_SEND if service could be executed successfully and a response
- *should be sent
+ **should be sent
  */
  */
 typedef EipStatus (*CipServiceFunction)(
 typedef EipStatus (*CipServiceFunction)(
-    CipInstance *const instance, CipMessageRouterRequest *const message_router_request,
-    CipMessageRouterResponse *const message_router_response);
+  CipInstance *const instance,
+  CipMessageRouterRequest *const message_router_request,
+  CipMessageRouterResponse *const message_router_response);
 
 
 /** @brief Service descriptor. These are stored in an array */
 /** @brief Service descriptor. These are stored in an array */
 typedef struct cip_service_struct {
 typedef struct cip_service_struct {
@@ -384,19 +319,19 @@ typedef struct {
 } CipUnconnectedSendParameter;
 } CipUnconnectedSendParameter;
 
 
 /* these are used for creating the getAttributeAll masks
 /* these are used for creating the getAttributeAll masks
- TODO there might be a way simplifying this using __VARARGS__ in #define */
-#define MASK1(a) (1 << (a))
-#define MASK2(a, b) (1 << (a) | 1 << (b))
-#define MASK3(a, b, c) (1 << (a) | 1 << (b) | 1 << (c))
-#define MASK4(a, b, c, d) (1 << (a) | 1 << (b) | 1 << (c) | 1 << (d))
+   TODO there might be a way simplifying this using __VARARGS__ in #define */
+#define MASK1(a) ( 1 << (a) )
+#define MASK2(a, b) ( 1 << (a) | 1 << (b) )
+#define MASK3(a, b, c) ( 1 << (a) | 1 << (b) | 1 << (c) )
+#define MASK4(a, b, c, d) ( 1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) )
 #define MASK5(a, b, c, d, e) \
 #define MASK5(a, b, c, d, e) \
-  (1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e))
+  ( 1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) )
 #define MASK6(a, b, c, d, e, f) \
 #define MASK6(a, b, c, d, e, f) \
-  (1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) | 1 << (f))
+  ( 1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) | 1 << (f) )
 #define MASK7(a, b, c, d, e, f, g) \
 #define MASK7(a, b, c, d, e, f, g) \
-  (1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) | 1 << (f) | 1 << (g))
+  ( 1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) | 1 << (f) | 1 << (g) )
 #define MASK8(a, b, c, d, e, f, g, h)                                \
 #define MASK8(a, b, c, d, e, f, g, h)                                \
-  (1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) | 1 << (f) | \
-   1 << (g) | 1 << (h))
+  ( 1 << (a) | 1 << (b) | 1 << (c) | 1 << (d) | 1 << (e) | 1 << (f) | \
+    1 << (g) | 1 << (h) )
 
 
 #endif /* OPENER_CIPTYPES_H_ */
 #endif /* OPENER_CIPTYPES_H_ */