Ovis_Decoration_Info_Template_Create()
Abstract
Creates the template that determines which elements will populate the Ovis group when the group instance is created.
Syntax
Ovis_Decoration_Info_Template_Create (name)
| Argument | Type | Description |
|---|---|---|
name |
const char * |
Template name |
Return Type
OvisT_Info_Template *
Ovis template
Header
ovis_decoration.h
Details
This function creates the template that determines which elements will populate the Ovis group when the group instance is created with Ovis_Decoration_Info_Group_Create(). To add attributes to the template, use Ovis_Decoration_Info_Template_Graph_Element_Add(), Ovis_Decoration_Info_Template_Range_Element_Add(), or Ovis_Decoration_Info_Template_Scalar_Element_Add().
Example
#define INCOMING_PACKET_FIELD "Incoming"
OvisT_Info_Template * template;
OvisT_Info_Group * info;
OvisT_3D_Position pos;
template = Ovis_Decoration_Info_Template_Create ("Packet count");
Ovis_Decoration_Info_Template_Scalar_Element_Add (template, INCOMING_PACKET_FIELD);
Ovis_Position_Geodetic_Set (&pos, 0, 0, 100);
info = Ovis_Decoration_Info_Group_Create (template, pos,
prg_color_from_string ("blue"), OPC_NIL, OPC_NIL, OPC_NIL);
Ovis_Decoration_Info_Group_Scalar_Element_Value_Set (info, INCOMING_PACKET_FIELD,
10);
Errors
- No template name provided.
Reference
- Use the functions
Ovis_Decoration_Info_Template_Scalar_Element_Add(),Ovis_Decoration_Info_Template_Range_Element_Add(), andOvis_Decoration_Info_Template_Graph_Element_Add()to set up the components of the template. - Use the function
Ovis_Decoration_Info_Group_Create()to generate an info group using a template. - Use the functions
Ovis_Decoration_Info_Group_Scalar_Element_Value_Set()andOvis_Decoration_Info_Group_Vector_Element_Value_Set()to update the data in the info group.