Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > C Code > Generating C Code > Overview of generating C code (C code) > Overview of modeling C code (C code) > Overview of modeling C code (C code) > Signal mapping for C (C code)
  
Signal mapping for C (C code)
For each Signal that is not nested, ACS generates a header file (.h) and an implementation file (.c). Each Signal maps to a struct in the header file created for the Signal.
The struct declaration and implementation is derived from the items it owns and properties of the Signal.
Child items:
If the Signal owns Attributes, the Attributes are generated within the struct declaration. For Attribute mapping information, see Attribute mapping for C (C code).
If a typed Part (Attribute) has an Association that has not been rolled up to the Part's type, ACS generates a nested struct that is derived from the Part's type. The nested struct defines the Role that is modeled against the Part.
If a Signal owns Parts (Attributes or Roles) that are connected through an Association, initialization code is generated in the constructor for the Signal.
If the Signal owns Classes through nested Classes, the nested Classes are generated within the struct declaration, unless its C Non Member tag definition is set to TRUE.
If the Signal owns Dependencies, ACS typically generates #includes in the code. For Dependency mapping information, see Dependency mapping for C (C code
If the Signal owns Generalizations that define inheritance, the attributes are rolled down. Rolled down attributes are indicated through comments. For Generalization mapping information, see Generalization mapping for C (C code)
If the Signal owns Roles, the Roles are typically generated as attributes within the struct declaration. For Role mapping information, see Association and role mapping for C (C code)
If a typed Part (Role) has an Association that has not been rolled up to the Part's type, ACS generates a nested struct that is derived from the Part's type. The nested struct defines the Role that is modeled against the Part.
If a Signal owns Parts (Attributes or Roles) that are connected through an Association, initialization code is generated in the constructor for the Signal.
If the Signal owns Type Definitions, the Type Definitions are generated in the file created for the owning Signal, but outside of the struct definition. For Type Definition mapping information, see Type definition mapping for C (C code)
Other child items are ignored.
Properties:
The Abstract property is ignored.
If the Description property has a value, ACS generates the description as a comment on the line before the struct declaration.
The Formal Template Parameters property is ignored.
The Name property is generated as the name of the header and implementation files, and the name of the struct in the code.
* 
ACS may modify the struct name that is added to the code to make it valid for C. You can specify the exact struct name to add to the code through the CODE_GENERATION_NAME property of a Signal. Tell me more...
The Persistent property is ignored.
The Template property is ignored.
The Template Specialization Parameters property is ignored.
The Template Specialization property is ignored.
If the Union property is set to TRUE (Union check box selected in Property Pages), the Signal is generated as a union.
If the Visibility property is set to Public or Protected, the struct is declared in the header file. If the Visibility property is set to Private, the struct is declared in the implementation file. For nested Signals, this property is ignored.
Tag Definitions:
None