MCPcopy Create free account
hub / github.com/EIPStackGroup/OpENer / CreateAssemblyClass

Function CreateAssemblyClass

source/src/cip/cipassembly.c:32–56  ·  view source on GitHub ↗

@brief Constructor for the assembly object class * * Creates an initializes Assembly class or object instances * @return Pointer to the created Assembly object */

Source from the content-addressed store, hash-verified

30 * @return Pointer to the created Assembly object
31 */
32CipClass *CreateAssemblyClass(void) {
33 /* create the CIP Assembly object with zero instances */
34 CipClass *assembly_class = CreateCipClass(kCipAssemblyClassCode, 0, /* # class attributes*/
35 7, /* # highest class attribute number*/
36 1, /* # class services*/
37 2, /* # instance attributes*/
38 4, /* # highest instance attribute number*/
39 2, /* # instance services*/
40 0, /* # instances*/
41 "assembly", /* name */
42 2, /* Revision, according to the CIP spec currently this has to be 2 */
43 NULL); /* # function pointer for initialization*/
44 if(NULL != assembly_class) {
45 InsertService(assembly_class,
46 kGetAttributeSingle,
47 &GetAttributeSingle,
48 "GetAttributeSingle");
49 InsertService(assembly_class,
50 kSetAttributeSingle,
51 &SetAssemblyAttributeSingle,
52 "SetAssemblyAttributeSingle");
53 }
54
55 return assembly_class;
56}
57
58/** @brief create the CIP Assembly object with zero instances
59 *

Callers 2

CipAssemblyInitializeFunction · 0.85
CreateAssemblyObjectFunction · 0.85

Calls 2

CreateCipClassFunction · 0.85
InsertServiceFunction · 0.85

Tested by

no test coverage detected