PK_SESSION_receive_u   

PK_ERROR_code_t               PK_SESSION_receive_u
(
--- received arguments ---
const PK_UCHAR_t             *key,      --- key string
const PK_SESSION_receive_o_t *options   --- receive options
)


This function receives a session from the given Unicode 'file' 'key'.


Specific Errors:
    PK_ERROR_bad_key               Frustrum (UCOPRD) returned FR_bad_name
                                     (MILD)
    PK_ERROR_key_not_found         Frustrum (UCOPRD) returned FR_not_found
                                     (MILD)
    PK_ERROR_cant_open_file        Frustrum (UCOPRD) returned FR_open_fail
                                     (MILD)
    PK_ERROR_file_access_error     Error reading or closing the transmit file
                                     (MILD)
    PK_ERROR_schema_access_error   Error opening, closing, or reading the
                                      schema file (MILD)
    PK_ERROR_schema_corrupt        Contents of schema file not as expected
                                     (MILD)
    PK_ERROR_schema_incompatible   Schema contents in newer format (MILD)
    PK_ERROR_wrong_format          File does not have expected transmit format
                                     (MILD)
    PK_ERROR_wrong_version         File transmitted by incompatible version
                                      of modeller (MILD)
    PK_ERROR_corrupt_file          Invalid transmit file contents (MILD)
    PK_ERROR_file_read_corruption  Corrupt data read, perhaps an NFS problem
                                     (MILD)
    PK_ERROR_applio_not_registered Application i/o functions not registered
                                     (only relevant if options->transmit_format
                                      is PK_transmit_format_applio_c) (MILD)
    PK_ERROR_usfd_mismatch         File has incompatible user-field size (MILD)
    PK_ERROR_FG_receive_failure    Part contains irretrievable foreign
                                      geometry (MILD)
    PK_ERROR_rollback_not_started  Partitioned rollback is not active but file
                                      was transmitted with pmarks or has
                                      multiple partitions (MILD)
    PK_ERROR_locked                Session contains locked partitions (MILD)


Before this function can be used, it must be enabled by
PK_SESSION_set_unicode and then calls to PK_SESSION_register_frustrum and/or
PK_SESSION_register_applio.

The Unicode 'key' is passed to the frustrum, identifying from which 'file' the
session will be received.

The registered frustrum routine UCOPRD is called with guise FFCSNP
('snapshot' file containing a session).

The transmit format option affects the format argument to FFOPRD as follows:

    transmit format                format

    PK_transmit_format_text_c      FFTEXT
    PK_transmit_format_binary_c    FFBNRY
    PK_transmit_format_neutral_c   FFBNRY
    PK_transmit_format_applio_c   (function 'open_uc_rd' is called -
                                   see PK_SESSION_register_applio)

After the receive, either all the partitions in the session will have only
their initial pmark, or they will have all their pmarks if the session was
transmitted with deltas. The state of the bulletin board, attribute
definitions and interface and modelling parameters will be as saved in the
file. There will be no session marks, so it is impossible to roll back to
before a successful call to PK_SESSION_receive_u.

If the function fails, it will be possible to roll back, except in the case of
PK_ERROR_FG_receive_failure.

Received entities will have the same tags as when the session was transmitted.

Snapshot files can only be received by the same version of the modeller that
transmitted them.