Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phtransportregentry_t.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phtransportregentry_t.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phtransportregentry_t.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phtransportregentry_t.html on line 8
Data structure that describes data to be transported
typedef struct ph_transport_reg_entry {
char *type;
int unsigned packing;
int unsigned size;
int unsigned num_fixups;
PhTransportFixupRec_t const *fixups;
int unsigned const *endians;
} PhTransportRegEntry_t;
The PhTransportRegEntry_t structure describes how data is
to be packed for the Photon transport mechanism, taking into account
endian-ness and references to memory outside of the data type.
This structure includes the following:
- type
- The name of the type being registered.
- packing
- The packing method to be used (Ph_PACK_RAW,
Ph_PACK_STRING, or Ph_PACK_STRUCT).
- size
- The size, in bytes, of the data type.
- num_fixups
- The number of entries in the fixups arrays.
- fixups
- A list of instructions for dealing with references to data outside
the type being defined.
For more information, see
“Fixup manifests,”
below.
- endians
- A zero-terminated array of endian information for the members of the
data type.
All types or references to types correct the endian-ness of their
members based on the endian array defined for the type.
For more information, see
“Endian information,”
below.
The fixup manifests are:
Member type
|
Fixup Manifest |
Scalar
|
None |
Scalar Array
|
None |
Reference (string)
|
Tr_STRING( type, member ) |
Reference (scalar array)
|
Tr_REF_ARRAY( type, member,
number_of_elements ) |
Registered type
|
Tr_TYPE( type, member,
type_name ) |
Registered type array
|
Tr_TYPE_ARRAY( type, member,
type_name ) |
Reference (registered type)
|
Tr_REF_TYPE( type, member,
type_name ) |
Reference (registered type array)
|
Tr_REF_TYPE_ARRAY( type, member,
num_elements, type_name ) |
Reference( registered type reference array )
|
Tr_REF_TYPE_REF_ARRAY( type, member,
num_elements, type_name ) |
The classifications of endian-sensitive members are:
Members of type
|
Example
|
Classification |
int, long,
or short (signed or
unsigned)
|
unsigned int my_scalar
|
Tr_ENDIAN( typedef_name, member ) |
Arrays of short or int entries
|
short short_nums[10]
|
Tr_ENDIAN_ARRAY( typedef_name, member ) |
References to endian scalars
|
int *nums
|
Tr_ENDIAN_REF( typedef_name, member, num ) |
Photon
PhFindTransportType(),
PhFreeTransportType(),
PhMallocUnpack(),
PhPackEntry(),
PhRegisterTransportType(),
PhTransportType(),
PhUnpack()
“Registering new transport types”
in the Drag and Drop chapter of the Photon Programmer's Guide
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/ph/phtransportregentry_t.html on line 259
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/ph/phtransportregentry_t.html on line 259