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:
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