|
@@ -56,28 +56,28 @@ void InitializeCipMessageRouterClass(CipClass *cip_class) {
|
|
|
|
|
|
|
|
CipClass *meta_class = cip_class->class_instance.cip_class;
|
|
CipClass *meta_class = cip_class->class_instance.cip_class;
|
|
|
|
|
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 1, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 1, kCipUint, EncodeCipUint,
|
|
|
(void *) &cip_class->revision, kGetableSingleAndAll ); /* revision */
|
|
(void *) &cip_class->revision, kGetableSingleAndAll ); /* revision */
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 2, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 2, kCipUint, EncodeCipUint,
|
|
|
(void *) &cip_class->number_of_instances,
|
|
(void *) &cip_class->number_of_instances,
|
|
|
kGetableSingle ); /* largest instance number */
|
|
kGetableSingle ); /* largest instance number */
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 3, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 3, kCipUint, EncodeCipUint,
|
|
|
(void *) &cip_class->number_of_instances,
|
|
(void *) &cip_class->number_of_instances,
|
|
|
kGetableSingle ); /* number of instances currently existing*/
|
|
kGetableSingle ); /* number of instances currently existing*/
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 4, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 4, kCipUint, EncodeCipUint,
|
|
|
(void *) &kCipUintZero,
|
|
(void *) &kCipUintZero,
|
|
|
kGetableAll ); /* optional attribute list - default = 0 */
|
|
kGetableAll ); /* optional attribute list - default = 0 */
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 5, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 5, kCipUint, EncodeCipUint,
|
|
|
(void *) &kCipUintZero,
|
|
(void *) &kCipUintZero,
|
|
|
kGetableAll ); /* optional service list - default = 0 */
|
|
kGetableAll ); /* optional service list - default = 0 */
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 6, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 6, kCipUint, EncodeCipUint,
|
|
|
(void *) &meta_class->highest_attribute_number,
|
|
(void *) &meta_class->highest_attribute_number,
|
|
|
kGetableSingleAndAll ); /* max class attribute number*/
|
|
kGetableSingleAndAll ); /* max class attribute number*/
|
|
|
- InsertAttribute( (CipInstance *) cip_class, 7, kCipUint,
|
|
|
|
|
|
|
+ InsertAttribute2( (CipInstance *) cip_class, 7, kCipUint, EncodeCipUint,
|
|
|
(void *) &cip_class->highest_attribute_number,
|
|
(void *) &cip_class->highest_attribute_number,
|
|
|
kGetableSingleAndAll ); /* max instance attribute number*/
|
|
kGetableSingleAndAll ); /* max instance attribute number*/
|
|
|
|
|
|
|
|
- InsertService(meta_class, kGetAttributeAll, &GetAttributeAll,
|
|
|
|
|
|
|
+ InsertService(meta_class, kGetAttributeAll, &GetAttributeAll2,
|
|
|
"GetAttributeAll"); /* bind instance services to the metaclass*/
|
|
"GetAttributeAll"); /* bind instance services to the metaclass*/
|
|
|
InsertService(meta_class, kGetAttributeSingle, &GetAttributeSingle,
|
|
InsertService(meta_class, kGetAttributeSingle, &GetAttributeSingle,
|
|
|
"GetAttributeSingle");
|
|
"GetAttributeSingle");
|
|
@@ -86,7 +86,7 @@ void InitializeCipMessageRouterClass(CipClass *cip_class) {
|
|
|
EipStatus CipMessageRouterInit() {
|
|
EipStatus CipMessageRouterInit() {
|
|
|
|
|
|
|
|
CipClass *message_router = CreateCipClass(kCipMessageRouterClassCode, /* class code */
|
|
CipClass *message_router = CreateCipClass(kCipMessageRouterClassCode, /* class code */
|
|
|
- 0, /* # of class attributes */
|
|
|
|
|
|
|
+ 7, /* # of class attributes */
|
|
|
7, /* # highest class attribute number */
|
|
7, /* # highest class attribute number */
|
|
|
2, /* # of class services */
|
|
2, /* # of class services */
|
|
|
0, /* # of instance attributes */
|
|
0, /* # of instance attributes */
|