uuid_gen Command (NCS)
Purpose
Generates Universal Unique Identifiers (UUIDs) for objects, types, and interfaces.
Syntax
Description
The uuid_gen program generates Universal Unique Identifiers (UUIDs). By default, it generates a character-string representation of a UUID. The options for uuid_gen enable you to generate source-code representations of UUIDs, suitable for initializing variables of type uuid_$t.
Flags
Item | Description |
---|---|
-C | Generates a C source-code representation of a UUID. |
-c | Generates a template, including a UUID attribute, for an interface definition in the C syntax. |
-P | Generates a Pascal source-code representation of a UUID. |
-p | Generates a template, including a UUID attribute, for an interface definition in the Pascal syntax. |
Examples
- To generate a character-string
representation of a UUID, enter the following:
This produces the following output:/etc/ncs/uuid_gen
34dc23469000.0d.00.00.7c.5f.00.00.00
- To generate a template
for an interface definition in the C syntax, enter:
This produces the following output:/etc/ncs/uuid_gen -c
%c [ uuid(34dc239ec000.0d.00.00.7c.5f.00.00.00), version(1) ] interface INTERFACENAME { }
- To generate a C source-code
representation of a UUID, enter the following:
This produces the following output:/etc/ncs/uuid_gen -C
= { 0x34dc23af, 0xf000, 0x0000, 0x0d, {0x00, 0x00, 0x7c, 0x5f, 0x00, 0x00, 0x00} };
- To generate a template
for an interface definition in the Pascal syntax, enter the following:
This produces the following output:/etc/ncs/uuid_gen -p
%pascal [ uuid (458487b55160.02.c0.64.02.03.00.00.00), version (1) ] interface INTERFACENAME; end;
- To generate a Pascal
source-code representation of a UUID, enter the following:
This produces the following output:/etc/ncs/uuid_gen -P
:= [ time_high := 16#458487df, time_low := 16#9fb2, reserved := 16#000, family := chr(16#02), host := [chr(16#c0), chr(16#64), chr(16#02), chr(16#03), chr(16#00), chr(16#00), chr(16#00)] ]