fipcore_img FipCore

   API

This section presents functions, structures, and enumerations of the FipCore v2.x library that are useful for communicating with a FIP device.

To see examples of how to use the library, please go to the Tutorial section.

fipcore_get_deviceconf

Prototype
uint32_t fipcore_get_deviceconf(EXO_DEVICE_TYPE device_type, uint8_t device_index, FIP_DEVICECONF* device_conf)
Description
This function returns information about the target device.
Parameters
Input
device_type
FIP arbitrator device type.

device_index
Device index comprised between 1 and 9.
Output
device_conf
Structure containing device information.
Return Value
See Error Codes section.

fipcore_get_devices_number

Prototype
uint32_t fipcore_get_devices_number(uint8_t* nb_detected_devices)
Description
This function returns the number of FIP Arbitrator device on the machine.
Parameters
Input
NONE
Output
nb_detected_devices
Number of FIP Arbitrator devices detected.
Return Value
See Error Codes section.

fipcore_get_devices_list

Prototype
uint32_t fipcore_get_devices_list(FIP_DEVICECONF* devices_conf, uint8_t* nb_detected_devices)
Description
This function returns the number of FIP Arbitrator device on the machine and the information associated with it.
Parameters
Input
NONE
Output
devices_conf
Table of structures containing the information of detected devices.

nb_detected_devices
Number of FIP Arbitrator devices detected.
Return Value
See Error Codes section.

fipcore_get_error_str

Prototype
char* fipcore_get_error_str(uint32_t error_code)
Description
This function returns the error string specified by its code.
Parameters
Input
error_code
Error code (32-bits).

Output
NONE
Return Value
Error string. See Error Codes section.

fipcore_device_open

Prototype
fipcore_device_handle* fipcore_device_open(EXO_DEVICE_TYPE device_type, uint8_t device_index, uint32_t* error_code)
Description
This function starts the device and allocates the objects used internally by the library.
Parameters
Input
device_type
FIP arbitrator device type.

device_index
Device index comprised between 1 and 9.
Output
error_code
See Error Codes section.
Return Value
Fipcore handle session for the device. This handle will be used in all the functions described below.

fipcore_device_close

Prototype
uint32_t fipcore_device_close(fipcore_device_handle* hnd)
Description
This function closes the device and frees the objects used internally by the library.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_get_access_mode

Prototype
uint32_t fipcore_get_access_mode(fipcore_device_handle* hnd, uint8_t* access_mode)
Description
This function gets the current access mode of the FIP device.

FIP devices have two possible access modes:

  • Conventional Access: This is a communication mode through the 8-bit interface of the embedded FullFIP component (UCOM register).
  • Free Access: This is a communication mode through a direct access to the RAM component containing the FullFIP database.
NOTE: The use of Free Access mode drastically increases the read/write performance of the FIP device.
If your device supports it, it is therefore strongly recommended to use this access mode.
[See: fipcore_set_access_mode function]
Parameters
Input
hnd
Session handle.
Output
access_mode
Access mode (0 : Conventional Access, 1 : Free Access).
Return Value
See Error Codes section.

fipcore_set_access_mode

Prototype
uint32_t fipcore_set_access_mode(fipcore_device_handle* hnd, uint8_t access_mode)
Description
This function sets the access mode of the FIP device.

FIP devices have two possible access modes:

  • Conventional Access: This is a communication mode through the 8-bit interface of the embedded FullFIP component (UCOM register).
  • Free Access: This is a communication mode through a direct access to the RAM component containing the FullFIP database.

By default, all FIP boards are set to Conventional Access mode. If your card supports Free Access mode, it is possible to switch from one mode to the other by calling this function.

NOTE: The use of Free Access mode drastically increases the read/write performance of the FIP device. If your device supports it, it is therefore strongly recommended to use this access mode.
WARNING 1: Some devices do not support Free Access mode (ex: MobiFIP [USB]). For the PCI/PCIe product family, check the hardware version of the board (only recent designs support it).
WARNING 2: This function must be called up before the fipcode_init_network function. Once the FIP session is initialized, the FIP access mode will remain the same throughout the session.
Parameters
Input
hnd
Session handle.
access_mode
Access mode (0 : Conventional Access, 1 : Free Access).
Output
NONE
Return Value
See Error Codes section.

fipcore_get_rgb_led

Prototype
uint32_t fipcore_get_rgb_led(fipcore_device_handle* hnd, LED_RGB_COLOR* led_state)
Description
This function reads the RGB led state of the device.
Parameters
Input
hnd
Session handle.
Output
led_state
RGB color.
Return Value
See Error Codes section.

fipcore_set_rgb_led

Prototype
uint32_t fipcore_set_rgb_led(fipcore_device_handle* hnd, LED_RGB_COLOR led_state)
Description
This function changes the RGB led color of the device.
Parameters
Input
hnd
Session handle.

led_state
RGB color.
Output
NONE
Return Value
See Error Codes section.

fipcore_is_registered_device

Prototype
uint32_t fipcore_is_registered_device(fipcore_device_handle* hnd, EXO_SOFT_TYPE soft_type)
Description
This function tests the authorization of the device for a particular Exoligent software.
Parameters
Input
hnd
Session handle.

soft_type
Exoligent software to test.
Output
NONE
Return Value
See Error Codes section.

fipcore_get_config

Prototype
uint32_t fipcore_get_config(fipcore_device_handle* hnd, FIP_USERCONF* fip_conf)
Description
This function returns the entire station configuration structure.
Parameters
Input
hnd
Session handle.
Output
fip_conf
FIP station configuration.
Return Value
See Error Codes section.

fipcore_get_var_config_by_id

Prototype
uint32_t fipcore_get_var_config_by_id(fipcore_device_handle* hnd, uint16_t identifier, USERDEF_VARIABLE* var_conf)
Description
This function returns the variable configuration structure for the ID.
Parameters
Input
hnd
Session handle.

identifier
Variable ID.
Output
var_conf
Variable configuration.
Return Value
See Error Codes section.

fipcore_get_var_key_by_id

Prototype
uint32_t fipcore_get_var_key_by_id(fipcore_device_handle* hnd, uint16_t identifier, uint8_t direction, uint16_t* access_key)
Description
This function returns the internal access key for the variable specified by its ID.
Parameters
Input
hnd
Session handle.

identifier
Variable ID.

direction
Direction (0 : OUT, 1 : IN).
Output
access_key
Variable Access Key.
Return Value
See Error Codes section.

fipcore_get_var_id_by_key

Prototype
uint32_t fipcore_get_var_id_by_key(fipcore_device_handle* hnd, uint16_t access_key, uint16_t* identifier, uint8_t* direction)
Description
This function returns the variable ID specified by its internal access key.

Note : This function is useful for processing event_parameter of the fipcore_read_evt function.
Parameters
Input
hnd
Session handle.

access_key
Variable Access Key.
Output
identifier
Variable ID.

direction
Direction (0 : OUT, 1 : IN).
Return Value
See Error Codes section.

fipcore_get_msg_config_by_header

Prototype
uint32_t fipcore_get_msg_config_by_header(fipcore_device_handle* hnd, uint16_t dest_id, uint8_t dest_seg, uint16_t src_id, uint8_t src_seg, USERDEF_MESSAGE* msg_conf)
Description
This function returns the configuration structure for the message.
Parameters
Input
hnd
Session handle.

dest_id
Destination ID.

dest_seg
Destination segment.

src_id
Source ID.

src_seg
Source segment.
Output
msg_conf
Message configuration.
Return Value
See Error Codes section.

fipcore_get_tag_config_by_id

Prototype
uint32_t fipcore_get_tag_config_by_id(fipcore_device_handle* hnd, uint16_t tag_id, USERDEF_TAG* tag_conf)
Description
This function returns the tag configuration structure specified by its tag ID.
Parameters
Input
hnd
Session handle.

tag_id
Tag ID (Mnemonic ID).
Output
tag_conf
Tag configuration.
Return Value
See Error Codes section.

fipcore_get_tag_config_by_name

Prototype
uint32_t fipcore_get_tag_config_by_name(fipcore_device_handle* hnd, const char* tag_name, USERDEF_TAG* tag_conf)
Description
This function returns the tag configuration structure specified by its tag name.
Parameters
Input
hnd
Session handle.

tag_name
Tag name (Mnemonic name).
Output
tag_conf
Tag configuration.
Return Value
See Error Codes section.

fipcore_init_network

Prototype
uint32_t fipcore_init_network(fipcore_device_handle* hnd, EXO_FILE_TYPE file_type, const char* file_conf_path, FIP_USERCALLBACKS* user_callbacks)
Description
This function downloads the FIP station configuration file to the device. The file contains the FIP network parameters, the variables and the messages.
Parameters
Input
hnd
Session handle.

file_type
Type of FIP station configuration file.

file_conf_path
Path to FIP station configuration file.

user_callbacks
Structure containing user callbacks to be registered for this session.

WARNING: FipCore library only supports XML files.
To make this file, please refer to Station Configuration File section.
Output
NONE
Return Value
See Error Codes section.

fipcore_start_network

Prototype
uint32_t fipcore_start_network(fipcore_device_handle* hnd)
Description
This function starts the communication with the FIP network.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_stop_network

Prototype
uint32_t fipcore_stop_network(fipcore_device_handle* hnd)
Description
This function stops the communication with the FIP network. Then it unloads FIP station configuration from the device.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_get_medium

Prototype
uint32_t fipcore_get_medium(fipcore_device_handle* hnd, FIP_NETWORK_STATUS* network_status)
Description
This function retrieves the mediums status.
Parameters
Input
hnd
Session handle.
Output
network_status
Structure containing the information that is representative of transmission quality on the network, and on its operating status.
Return Value
See Error Codes section.

fipcore_set_medium_cmd

Prototype
uint32_t fipcore_set_medium_cmd(fipcore_device_handle* hnd, uint16_t fieldual_cmd)
Description
This function is used to send a command to the FIP channel controller.
Parameters
Input
hnd
Session handle.

fieldual_cmd
Medium Command [see enumeration MEDIUM_CMD].

  • bit0 and bit1 : Channel 1 Selection
    • b1b0 = 01b : Channel 1 enabled
    • b1b0 = 10b : Channel 1 disabled

  • bit2 and bit3 : Channel 2 Selection
    • b3b2 = 01b : Channel 2 enabled
    • b3b2 = 10b : Channel 2 disabled

  • bit4 : Clear Errors
    • b4 = 1 : Clear
    • b4 = 0 : Do not clear

  • bit5 : Channel 1 Reset
    • b5 = 1 : Reset channel 1
    • b5 = 0 : Do not reset channel 1

  • bit6 : Channel 2 Reset
    • b6 = 1 : Reset channel 2
    • b6 = 0 : Do not reset channel 2

  • bit7 to bit15 : Reserved
Output
NONE
Return Value
See Error Codes section.

fipcore_write_var_by_id

Prototype
uint32_t fipcore_write_var_by_id(fipcore_device_handle* hnd, uint16_t identifier, PRODUCED_VARIABLE* p_var)
Description
This function allows the user to write a FIP variable to the network from its identifier.
Parameters
Input
hnd
Session handle.

identifier
Variable identifier (ID).

p_var
Structure containing data to send.

NOTE: The real length of useful data which will be sent to the network depends on its definition in the FIP configuration file.
Output
NONE
Return Value
See Error Codes section.

fipcore_read_var_by_id

Prototype
uint32_t fipcore_read_var_by_id(fipcore_device_handle* hnd, uint16_t identifier, CONSUMED_VARIABLE* c_var, bool* is_prompt, bool* is_refreshed)
Description
This functions allows the user to read a FIP variable on the network from its identifier.
Parameters
Input
hnd
Session handle.

identifier
Variable identifier (ID).
Output
c_var
Structure containing read data.

is_prompt
Promptness validity.

is_refreshed
Refreshment validity.

NOTE 1: is_prompt value is significant only if the variable promptness is set in FIP configuration file.
NOTE 2: is_refreshed value is significant only if the variable refreshment is set in FIP configuration file.
Return Value
See Error Codes section.

fipcore_read_var_svf_by_id

Prototype
uint32_t fipcore_read_var_svf_by_id(fipcore_device_handle* hnd, uint16_t identifier, CONSUMED_VARIABLE* c_var, bool* is_prompt, bool* is_refreshed)
Description
This function allows the user to read a FIP variable on the network from its identifier even if its length and PDU definition is unknown into the FIP configuration file.
Parameters
Input
hnd
Session handle.

identifier
Variable identifier (ID).
Output
c_var
Structure containing read data.

is_prompt
Promptness validity.

is_refreshed
Refreshment validity.

NOTE 1: is_prompt value is significant only if the variable promptness is set in FIP configuration file.
NOTE 2: is_refreshed value is significant only if the variable refreshment is set in FIP configuration file.
Return Value
See Error Codes section.

fipcore_read_var_time_by_id

Prototype
uint32_t fipcore_read_var_time_by_id(fipcore_device_handle* hnd, uint16_t identifier, CONSUMED_VARIABLE_TIME* c_var_time, uint32_t* production_time, uint32_t* transmission_time, uint32_t* consumption_time, uint32_t* reception_time, bool* is_prompt, bool* is_refreshed)
Description
This function allows the user to read a FIP variable with a dynamic refresh status on the network.
Parameters
Input
hnd
Session handle.

identifier
Variable identifier (ID).
Output
c_var_time
Structure containing read data.

production_time
Time elapsed between the variable writing by the user and its emission on the network (in μs).

transmission_time
Transfer time of the variable on the network (in μs). This time is calculated based on the variable length and the network speed.

consumption_time
Time elapsed between the reception of the variable from the network and the reading by the user (in μs).

reception_time
transmission_time + consumption_time

is_prompt
Promptness validity.

is_refreshed
Refreshment validity.

NOTE 1: is_prompt value is significant only if the variable promptness is set in FIP configuration file.
NOTE 2: is_refreshed value is significant only if the variable refreshment is set in FIP configuration file.
Return Value
See Error Codes section.

fipcore_read_lstpresent

Prototype
uint32_t fipcore_read_lstpresent(fipcore_device_handle* hnd, PRESENT_LIST* present_list)
Description
This function reads the management variable of the SM_MPS network called Presence List. This variable, created and distributed on the network through the active BA carrier device, contains the list of all subscribers connected to each medium.
Parameters
Input
hnd
Session handle.

Output
present_list
Structure containing the list of all subscribers and that indicates their presence or not.
Return Value
See Error Codes section.

fipcore_send_aper_by_id

Prototype
uint32_t fipcore_send_aper_by_id(fipcore_device_handle* hnd, uint16_t identifier, uint8_t mode)
Description
This function allows the user to send a request for an aperiodical variable transmission.
This request has two levels of priority depending on the mode parameter value.
The necessary condition to send the request to the bus arbitrator is to have at least one produced variable with aperiodical variable transmission request authorized in the station configuration file (See <AperiodicService> tag).
Parameters
Input
hnd
Session handle.

identifier
Variable identifier (ID).

mode
0 - Normal request, 1 - Urgent request.
Output
NONE
Return Value
See Error Codes section.

fipcore_purge_aper

Prototype
uint32_t fipcore_purge_aper(fipcore_device_handle* hnd, uint8_t fifo_type)
Description
This function purges the aperiodic request storage FIFO. The fifo_type parameter value indicates the FIFO request to purge (normal or urgent).
Parameters
Input
hnd
Session handle.

fifo_type
0 - Normal request FIFO, 1 - Urgent request FIFO.
Output
NONE
Return Value
See Error Codes section.

fipcore_def_var_event_by_id

Prototype
uint32_t fipcore_def_var_event_by_id(fipcore_device_handle* hnd, uint16_t identifier, uint16_t event_code)
Description
This function allows to dynamically define an event associated with a variable in emission or reception.
The associated event can be temporary or permanent.
A permanent event is sent/received each time the variable is produced or consumed.
However a temporary event is sent/received only once.
Parameters
Input
hnd
Session handle.

identifier
Variable identifier (ID).

event_code
Event type to associate with the variable.

  • FIP_EVT_SEND_VAR_T (0x0100): Temporary event on sent variable.
  • FIP_EVT_SEND_VAR_P (0x8100): Permanent event on sent variable.
  • FIP_EVT_RECEIVE_VAR_T (0x0200): Temporary event on received variable.
  • FIP_EVT_RECEIVE_VAR_P (0x8200): Permanent event on received variable.
Output
NONE
Return Value
See Error Codes section.

fipcore_write_msg

Prototype
uint32_t fipcore_write_msg(fipcore_device_handle* hnd, uint16_t channel_number, MESSAGE_FRAME_OUT* message_frame_out)
Description
This function allows the user to write a FIP message in the FIFO emission channel of the device.
Parameters
Input
hnd
Session handle.

channel_number
The channel on which the message is to be sent.

  • 0: Aperiodic messaging channel.
  • 1 to 8: Periodic messaging channel.
message_frame_out
Structure containing message to sent.
Output
NONE
Return Value
See Error Codes section.

fipcore_read_msg

Prototype
uint32_t fipcore_read_msg(fipcore_device_handle* hnd, MESSAGE_FRAME_IN* message_frame_in)
Description
This function allows the user to read a FIP message from the FIFO reception channel of the device.

Note : When a message is received, an event is signaled by the event code: FIP_EVT_RECEIVE_MSG.
See also : fipcore_read_evt, FIP_EVENT_CODE
Parameters
Input
hnd
Session handle.

Output
message_frame_in
Structure containing received message.
Return Value
See Error Codes section.

fipcore_purge_msg

Prototype
uint32_t fipcore_purge_msg(fipcore_device_handle* hnd, uint16_t channel_number, uint16_t* nb_blocks_freed, uint16_t* blocks_freed_tab)
Description
This function allows the user to selectively purge the content of the message send queues.
It frees up the allocated FIFO blocks corresponding to the channel selected.
Parameters
Input
hnd
Session handle.

channel_number
The transmission channel that must be purged.

  • 0: Aperiodic messaging channel.
  • 1 to 8: Periodic messaging channel.
Output
nb_blocks_freed
Number of freed message blocks.

blocks_freed_tab
Table of freed block numbers. Up to 64 * uint16_t.
Return Value
See Error Codes section.

fipcore_set_file_reception_dir_path

Prototype
uint32_t fipcore_set_file_reception_dir_path(fipcore_device_handle* hnd, const char* directory_path)
Description
This function is used to set the directory path for the input files coming from the FIP network.
Parameters
Input
hnd
Session handle.

directory_path
Folder for receiving incoming files.

Output
NONE
Return Value
See Error Codes section.

fipcore_send_file

Prototype
uint32_t fipcore_send_file(fipcore_device_handle* hnd, uint16_t channel_number, uint16_t dest_id, uint8_t dest_seg, uint16_t src_id, uint8_t src_seg, const char* file_path)
Description
This function allows you to send a file on the FIP network.
Parameters
Input
hnd
Session handle.

channel_number
Transmission channel type.

  • 0: Aperiodic messaging channel.
  • 1 to 8: Periodic messaging channel.
dest_id
File destination ID.

dest_seg
File destination segment.

src_id
File source ID.

src_seg
File source segment.

file_path
Path of the file to be sent.
Output
NONE
Return Value
See Error Codes section.

fipcore_abort_file_emission

Prototype
uint32_t fipcore_abort_file_emission(fipcore_device_handle* hnd)
Description
This function cancels the current file transmission.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_write_tag_by_id

Prototype
uint32_t fipcore_write_tag_by_id(fipcore_device_handle* hnd, uint16_t tag_id, void* data)
Description
This function allows the user to write a tag value to the FIP network from its tag ID.
Parameters
Input
hnd
Session handle.

tag_id
Tag identifier (Tag ID).

data
Pointer to the value to be written.
Output
NONE
Return Value
See Error Codes section.

fipcore_write_tag_by_name

Prototype
uint32_t fipcore_write_tag_by_name(fipcore_device_handle* hnd, const char* tag_name, void* data)
Description
This function allows the user to write a tag value to the FIP network from its tag name.
Parameters
Input
hnd
Session handle.

tag_name
Tag name.

data
Pointer to the value to be written.
Output
NONE
Return Value
See Error Codes section.

fipcore_read_tag_by_id

Prototype
uint32_t fipcore_read_tag_by_id(fipcore_device_handle* hnd, uint16_t tag_id, void* data)
Description
This function allows the user to read a tag value from the FIP network from its tag ID.
Parameters
Input
hnd
Session handle.

tag_id
Tag identifier (Tag ID).
Output
data
Pointer to the value to be read.
Return Value
See Error Codes section.

fipcore_read_tag_by_name

Prototype
uint32_t fipcore_read_tag_by_name(fipcore_device_handle* hnd, const char* tag_name, void* data)
Description
This function allows the user to read a tag value from the FIP network from its tag name.
Parameters
Input
hnd
Session handle.

tag_name
Tag name.
Output
data
Pointer to the value to be read.
Return Value
See Error Codes section.

fipcore_start_ba

Prototype
uint32_t fipcore_start_ba(fipcore_device_handle* hnd, uint8_t ba_number)
Description
This function starts the bus arbiter. The user can select the scan table number to run.
Parameters
Input
hnd
Session handle.

ba_number
Scan table number to run [1 or 2].
Output
NONE
Return Value
See Error Codes section.

fipcore_stop_ba

Prototype
uint32_t fipcore_stop_ba(fipcore_device_handle* hnd)
Description
This function stops the bus arbiter.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_continue_ba

Prototype
uint32_t fipcore_continue_ba(fipcore_device_handle* hnd, uint16_t ba_continue_address)
Description
This function processes the command allowing the user to order resumption of bus arbiter program execution at a specific address.
This function is used for processing program instruction BA_SUSPEND, which is needed for the user to run the subscriber presence test (FIELDUAL compatible mode or ZN130). This command is only acknowledged by the software if the bus arbiter is in initial BA_PENDING status.

WARNING: If the program resumption order does not occur before the end of the timeout associated with the instruction BA_SUSPEND, the bus arbiter initiates its stop procedure.
Parameters
Input
hnd
Session handle.

ba_continue_address
Restart address of the bus arbiter. This address is given by the BA_SUSPEND event.
Output
NONE
Return Value
See Error Codes section.

fipcore_change_macrocycle

Prototype
uint32_t fipcore_change_macrocycle(fipcore_device_handle* hnd, uint8_t ba_number)
Description
This function allows the user to change the scan table to be executed by the bus arbiter whether it be active, idle or stopped.
The macro-cycle change becomes effective on completion of execution of the current macro-cycle, on program instruction BA_NEXT_MACRO.
Parameters
Input
hnd
Session handle.

ba_number
Scan table number to run [1 or 2].
Output
NONE
Return Value
See Error Codes section.

fipcore_synchro_ba

Prototype
uint32_t fipcore_synchro_ba(fipcore_device_handle* hnd)
Description
This function allows to resynchronize execution of a bus arbiter program.
This instruction is used for processing program instruction BA_WAIT_SYNC or BA_WAIT_SYNC_SILENCE.
When the command is received, the bus arbiter resumes execution of its program at the current address.

WARNING: If there is no external resynchronization before the end of the timeout associated with instructions BA_WAIT_SYNC and BA_WAIT_SYNC_SILENCE, the bus arbiter initiates its stop procedure.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_change_param_ba

Prototype
uint32_t fipcore_change_param_ba(fipcore_device_handle* hnd, BA_PARAMETERS* ba_parameters)
Description
This function is used to modify some bus arbiter operating parameters on-line:

  • Physical address of network subscriber (station)
  • Maximum number of subscribers connectable to network
  • Bus arbiter priority level
  • Bus arbiter start timeout
  • Bus arbiter election timeout
Parameters
Input
hnd
Session handle.

ba_parameters
Bus arbiter parameters.
Output
NONE
Return Value
See Error Codes section.

fipcore_read_evt

Prototype
uint32_t fipcore_read_evt(fipcore_device_handle* hnd, uint16_t* event_code, uint16_t* event_parameter)
Description
This function allows the user to read a memorized event in a single storage queue (up to 32 items).
The following events are reported:

  • Sending / Receiving of a variable (optional)
  • Sending / Receiving of a message
  • Sending of a list of aperiodic requests
  • Reporting the switch of bus arbiter from idle to active status
  • Reporting of bus arbiter suspension

NOTE: This function should be called cyclically in order to regularly pop the internal device event stack. For PCI/PCIe device types, it is recommanded to call it inside the callback cb_fip_event.
Parameters
Input
hnd
Session handle.
Output
event_code
Event code received [see FIP_EVENT_CODE enumeration].

event_parameter
Additional parameter related to event_code parameter.

Note : This parameter is significant only for the following event codes:

  • FIP_EVT_SEND_VAR_P / FIP_EVT_SEND_VAR_T :
    event_parameter = Variable access key
    See also: fipcore_get_var_id_by_key

  • FIP_EVT_RECEIVE_VAR_P / FIP_EVT_RECEIVE_VAR_T :
    event_parameter = Variable access key
    See also: fipcore_get_var_id_by_key

  • FIP_EVT_SEND_MSG :
    event_parameter = Emission status

    File progression callback struct

    • Cr_Emission: Emission report
      • MSG_SDN_ACK :
        message (without ack) sent
      • MSG_SDN_ERROR :
        error in emission for message (without ack)
      • MSG_NO_ACK :
        message (with acknowledgement) sent but not ack
      • MSG_ACK_POS :
        positive acknowledgement
      • MSG_ACK_POS_REP :
        positive acknowledgement after repeat
      • MSG_ACK_NEG :
        negative acknowledgement
      • MSG_ACK_NEG_REP :
        negative acknowledgement after repeat

    • FIFO: FIFO emission number (0: aperiodic - 1..8: periodic)

    • Block: Block number in FIFO emission (0 to 63)

  • FIP_EVT_BA_SUSPEND :
    event_parameter = BA suspension address program (16-bit address in zone reserved for BA)
    See also : fipcore_continue_ba
Return Value
See Error Codes section.

fipcore_reset_stats

Prototype
uint32_t fipcore_reset_stats(fipcore_device_handle* hnd)
Description
This function clears all the counters associated with FIP_STATISTICS structure.

WARNING: USB FIP Arbitrator device does not support this function.
Parameters
Input
hnd
Session handle.

Output
NONE
Return Value
See Error Codes section.

fipcore_get_stats

Prototype
uint32_t fipcore_get_stats(fipcore_device_handle* hnd, FIP_STATISTICS* stats)
Description
This function retrieves the statistics counters for the PCI/PCIe devices type.

Note : To keep the FIP_STATISTICS structure up to date, the user must ensure that the events of the FIP network are correctly popped by calling the fipcore_read_evt function.

WARNING: USB FIP Arbitrator device does not support this function.
Parameters
Input
hnd
Session handle.
Output
stats
Statistics structure.
Return Value
See Error Codes section.

fipcore_opcua_run_startup

Prototype
uint32_t fipcore_opcua_run_startup(fipcore_device_handle* hnd, uint16_t port, OPCUA_USERCONF* opc_conf)
Description
This function starts an OPC UA server and expose the current FIP network context.

NOTE: This function must be called only for a non-blocking operation of the server. Otherwise please use fipcore_opcua_run.
Parameters
Input
hnd
Session handle.

port
TCP Port.

opc_conf
OPC UA server configuration.
Note: If this parameter is not set (null), by default the server will start with an unencrypted channel and allow anonymous client connections.
Output
NONE
Return Value
See Error Codes section.

fipcore_opcua_run_iterate

Prototype
uint32_t fipcore_opcua_run_iterate(fipcore_device_handle* hnd, bool wait_internal, uint16_t* timeout)
Description
This function executes a single iteration of the server's main loop.

NOTE: This function must be called only for a non-blocking operation of the server. Otherwise please use fipcore_opcua_run.
Parameters
Input
hnd
Session handle.

wait_internal
Should we wait for messages in the network layer? Otherwise, the timeouts for the network layers are set to zero. The default max wait time is 50millisec.
Output
timeout
Returns how long we can wait until the next scheduled job (in millisec)
Return Value
See Error Codes section.

fipcore_opcua_run_shutdown

Prototype
uint32_t fipcore_opcua_run_shutdown(fipcore_device_handle* hnd)
Description
This function stops the OPC UA server.

NOTE: This function must be called only for a non-blocking operation of the server. Otherwise please use fipcore_opcua_run.
Parameters
Input
hnd
Session handle.
Output
NONE
Return Value
See Error Codes section.

fipcore_opcua_run

Prototype
uint32_t fipcore_opcua_run(fipcore_device_handle* hnd, uint16_t port, bool* running, OPCUA_USERCONF* opc_conf)
Description
This function starts an OPC UA server and expose the current FIP network context. It's a blocking function, so to stop the server the 'running' boolean must be set to false.
Parameters
Input
hnd
Session handle.

port
TCP Port.

running
Server state (Force to false to exit the function).

opc_conf
OPC UA server configuration.
Note: If this parameter is not set (null), by default the server will start with an unencrypted channel and allow anonymous client connections.
Output
NONE
Return Value
See Error Codes section.

EXO_FILE_TYPE

Definition
enum EXO_FILE_TYPE { XML, CNF }
Description
This enum describes the file types supported by the Exoligent softwares.
Values
ConstantValueDescription
XML0The file has "xml" structure type
CNF1The file has "cnf" structure type (obsolete)
See also

EXO_DEVICE_TYPE

Definition
enum EXO_DEVICE_TYPE { PCI_PCIE_TYPE, USB_TYPE }
Description
This enum describes the FIP arbitrator devices families supported by the Exoligent softwares.
Values
ConstantValueDescription
PCI_PCIE_TYPE1PCI/PCIe FIP Arbiter board (pci, pcie, pci104, pcie104, pxi, pxie, mpcie)
USB_TYPE2USB FIP Arbiter board
See also

EXO_SOFT_TYPE

Definition
enum EXO_SOFT_TYPE { FIPCORE, FIPCOREPLUS, FIPLABS }
Description
This enum describes the Exoligent software names.
Values
ConstantValueDescription
FIPCORE0API library to control a FIP Arbitrator device
FIPCOREPLUS1

Extended functions for FipCore library. This soft option includes:

  • FipBusView library (lvlib): To control a FIP Arbitrator device from Labview.

  • OPC UA server functions (from FipCore and FipBusView libraries)
FIPLABS2GUI for designing, controlling and analyzing a FIP network (based on FipCore library)
See also

EXO_SUBSYSID

Definition
enum EXO_SUBSYSID { EXO_SUBSYSID_OLD_PCI, EXO_SUBSYSID_PCI, EXO_SUBSYSID_PCIE, EXO_SUBSYSID_PCI104, EXO_SUBSYSID_PCIE104, EXO_SUBSYSID_PXI, EXO_SUBSYSID_PXIE, EXO_SUBSYSID_MPCIE, EXO_SUBSYSID_CPCI, EXO_SUBSYSID_PCI_OPT, EXO_SUBSYSID_PCIE_OPT, EXO_SUBSYSID_PCI104_OPT, EXO_SUBSYSID_PCIE104_OPT, EXO_SUBSYSID_PXI_OPT, EXO_SUBSYSID_PXIE_OPT, EXO_SUBSYSID_MPCIE_OPT, EXO_SUBSYSID_CPCI_OPT }
Description
This enum describes the Subsystem Device IDs for Exoligent FIP Arbiter boards.
Values
ConstantValueDescription
EXO_SUBSYSID_OLD_PCI0x9050PCI FIP Arbiter on copper (old model)
EXO_SUBSYSID_PCI0x5201PCI FIP Arbiter on copper
EXO_SUBSYSID_PCIE0x5301PCIe FIP Arbiter on copper
EXO_SUBSYSID_PCI1040x5401PCI/104 FIP Arbiter on copper
EXO_SUBSYSID_PCIE1040x5501PCIe/104 FIP Arbiter on copper
EXO_SUBSYSID_PXI0x5601PXI FIP Arbiter on copper
EXO_SUBSYSID_PXIE0x5701PXIe FIP Arbiter on copper
EXO_SUBSYSID_MPCIE0x5801mPCIe FIP Arbiter on copper
EXO_SUBSYSID_CPCI0x5901cPCI FIP Arbiter on copper
EXO_SUBSYSID_PCI_OPT0x7201PCI FIP Arbiter on optical fiber
EXO_SUBSYSID_PCIE_OPT0x7301PCIe FIP Arbiter on optical fiber
EXO_SUBSYSID_PCI104_OPT0x7401PCI/104 FIP Arbiter on optical fiber
EXO_SUBSYSID_PCIE104_OPT0x7501PCIe/104 FIP Arbiter on optical fiber
EXO_SUBSYSID_PXI_OPT0x7601PXI FIP Arbiter on optical fiber
EXO_SUBSYSID_PXIE_OPT0x7701PXIe FIP Arbiter on optical fiber
EXO_SUBSYSID_MPCIE_OPT0x7801mPCIe FIP Arbiter on optical fiber
EXO_SUBSYSID_CPCI_OPT0x7901cPCI FIP Arbiter on optical fiber

FIP_SPEED

Definition
enum FIP_SPEED { SPEED_31K25, SPEED_1M, SPEED_2M5, SPEED_5M }
Description
This enum describes the FIP speeds.
Values
ConstantValueDescription
SPEED_31K250FIP speed at 31.25 Kbps
SPEED_1M1FIP speed at 1 Mbps
SPEED_2M52FIP speed at 2.5 Mbps
SPEED_5M3FIP speed at 5 Mbps
See also

FIP_IMPEDANCE

Definition
enum FIP_IMPEDANCE { IMPEDANCE_150, IMPEDANCE_120 }
Description
This enum describes the FIP impedance.
Values
ConstantValueDescription
IMPEDANCE_1500Network 150 Ω
IMPEDANCE_1201Network 120 Ω
See also

FIP_FRAME_TYPE

Definition
enum FIP_FRAME_TYPE { FRAME_TYPE_FIP, FRAME_TYPE_WORLDFIP, FRAME_TYPE_SLOWFIP }
Description
This enum describes the FIP frame types.
Values
ConstantValueDescription
FRAME_TYPE_FIP0FIP frame
FRAME_TYPE_WORLDFIP1WorldFIP frame
FRAME_TYPE_SLOWFIP2SlowFIP frame

LED_RGB_COLOR

Definition
enum LED_RGB_COLOR { BLACK, BLUE, GREEN, BLUE_SKY, RED, FUSCHIA, YELLOW, WHITE }
Description
This enum describes the available colors for a RGB LED.
Values
ConstantValueDescription
BLACK0Switched off LED
BLUE1Blue LED
GREEN2Green LED
BLUE_SKY3Blue Sky LED
RED4Red LED
FUSCHIA5Fuschia LED
YELLOW6Yellow LED
WHITE7White LED
See also

MEDIUM_CMD

Definition
enum MEDIUM_CMD { MEDIUM_CMD_CLR_CHANNELS_ERR, MEDIUM_CMD_RST_CH1, MEDIUM_CMD_RST_CH2, MEDIUM_CMD_ACTIVATE_CH1, MEDIUM_CMD_ACTIVATE_CH2, MEDIUM_CMD_ACTIVATE_CH1_AND_CH2 }
Description
This enum describes the allowed commands to send to the FIP channels controller (Fieldual).
Values
ConstantValueDescription
MEDIUM_CMD_CLR_CHANNELS_ERR0x0010Clear channels errors
MEDIUM_CMD_RST_CH10x0020Reset channel 2
MEDIUM_CMD_RST_CH20x0040Reset channel 1
MEDIUM_CMD_ACTIVATE_CH10x0009Only channel 1 selection
MEDIUM_CMD_ACTIVATE_CH20x0006Only channel 2 selection
MEDIUM_CMD_ACTIVATE_CH1_AND_CH20x0005Both channels selection
See also

MEDIUM_STATUS_FLAGS

Definition
enum MEDIUM_STATUS_FLAGS { MEDIUM_STATUS_CH1_VALID, MEDIUM_STATUS_CH2_VALID, MEDIUM_STATUS_CH1_TX_ERROR, MEDIUM_STATUS_CH2_TX_ERROR, MEDIUM_STATUS_CH1_WATCHDOG, MEDIUM_STATUS_CH2_WATCHDOG }
Description
This enum describes useful flags to know the status of the channels .
Values
ConstantValueDescription
MEDIUM_STATUS_CH1_VALID0x0001Channel 1 active
MEDIUM_STATUS_CH2_VALID0x0002Channel 2 active
MEDIUM_STATUS_CH1_TX_ERROR0x0004Channel 1 TX Error
MEDIUM_STATUS_CH2_TX_ERROR0x0008Channel 2 TX Error
MEDIUM_STATUS_CH1_WATCHDOG0x0010Channel 1 watchdog error
MEDIUM_STATUS_CH2_WATCHDOG0x0020Channel 2 watchdog error
See also

BA_STATUS_CODE

Definition
enum BA_STATUS_CODE { BA_STATUS_STOPPED, BA_STATUS_STARTING, BA_STATUS_IDLE, BA_STATUS_MACRO_END, BA_STATUS_SENDING_ID_DAT, BA_STATUS_SENDING_ID_MSG, BA_STATUS_TESTING, BA_STATUS_TESTING_END, BA_STATUS_PENDING, BA_STATUS_APER_WINDOW, BA_STATUS_MSG_WINDOW, BA_STATUS_WAITING_TIME, BA_STATUS_WAITING_SYNC, BA_STATUS_WAITING_SYNC_SILENT }
Description
This enum describes the different possible bus arbiter statuses.
Values
ConstantValueDescription
BA_STATUS_STOPPED0x0000Bus arbiter stopped
BA_STATUS_STARTING0x0003Bus arbiter in start-up phase
BA_STATUS_IDLE0x0007Bus arbiter in idle - Another BA is already active
BA_STATUS_MACRO_END0x8022End of macrocycle
BA_STATUS_SENDING_ID_DAT0x8023ID_DAT frame emission in progress
BA_STATUS_SENDING_ID_MSG0x8025ID_MSG frame emission in progress
BA_STATUS_TESTING0x8028Presence test in progress
BA_STATUS_TESTING_END0x8029End of presence test
BA_STATUS_PENDING0x8038Bus arbiter in pending - Wait for user action
BA_STATUS_APER_WINDOW0x800BProcessing of aperiodic requests for variables
BA_STATUS_MSG_WINDOW0x8004Processing of aperiodic requests for messages
BA_STATUS_WAITING_TIME0x8010Internal re-synchronization
BA_STATUS_WAITING_SYNC0x8031External re-synchronization
BA_STATUS_WAITING_SYNC_SILENT0x8032External re-synchronization - Silence
See also

FIP_EVENT_CODE

Definition
enum FIP_EVENT_CODE { FIP_EVT_NONE, FIP_EVT_SEND_VAR_P, FIP_EVT_SEND_VAR_T, FIP_EVT_RECEIVE_VAR_P, FIP_EVT_RECEIVE_VAR_T, FIP_EVT_RECEIVE_MSG, FIP_EVT_SEND_MSG, FIP_EVT_SEND_APU, FIP_EVT_SEND_APN, FIP_EVT_BA_ACTIVITY, FIP_EVT_BA_STOP1, FIP_EVT_BA_STOP2, FIP_EVT_BA_STOP3, FIP_EVT_BA_IDLE, FIP_EVT_BA_SUSPEND0, ..., FIP_EVT_BA_SUSPEND255 }
Description
This enum describes the possible network event codes returned by the fipcore_read_evt function.
Values
ConstantValueDescription
FIP_EVT_NONE0x0000No event
FIP_EVT_SEND_VAR_P0x8100Sending of a variable - permanent
FIP_EVT_SEND_VAR_T0x0100Sending of a variable - temporary
FIP_EVT_RECEIVE_VAR_P0x8200Reception of a variable - permanent
FIP_EVT_RECEIVE_VAR_T0x0200Reception of a variable - temporary
FIP_EVT_RECEIVE_MSG0x0240Reception of a message
FIP_EVT_SEND_MSG0x0140Sending of a message
FIP_EVT_SEND_APU0x0130Sending of a list of urgent aperiodic requests
FIP_EVT_SEND_APN0x0131Sending of a list of normal aperiodic requests
FIP_EVT_BA_ACTIVITY0x0400Bus arbiter reactivation (active on network)
FIP_EVT_BA_STOP10x0401Stopping of bus arbiter following a timeout recorded on execution of program instructions BA_SUSPEND or BA_WAIT_SYNC
FIP_EVT_BA_STOP20x0402Stopping of bus arbiter following detection of network anomalies or decoding of an unknown instruction code
FIP_EVT_BA_STOP30x0404Stopping of bus arbiter following user request
FIP_EVT_BA_IDLE0x0408Return of bus arbiter to idle status
FIP_EVT_BA_SUSPEND00x0500Suspension of bus arbiter program following decoding of the macro–instruction BA_SUSPEND (here on event number 0)
...0x0501 to 0x05feOther codes relative to the suspension of bus arbiter program
FIP_EVT_BA_SUSPEND2550x05ffSuspension of bus arbiter program on event number 255
See also

FILE_TRANSFER_STATE

Definition
enum FILE_TRANSFER_STATE { IDLE, IN_PROGRESS, COMPLETE, ABORTED }
Description
This enum describes the status of the file transert on the FIP network.
Values
ConstantValueDescription
IDLE0No file transfer in progress
IN_PROGRESS1File transfer in progress
COMPLETE2File transfer complete
ABORTED3File transfer aborted

DEVICE_VERSION

Definition
struct DEVICE_VERSION
Members
NameTypeDescription
majoruint8_tMajor number
minoruint8_tMinor number
revisionuint8_tRevision number

FIP_DEVICECONF

Definition
struct FIP_DEVICECONF
Members
NameTypeDescription
device_typeEXO_DEVICE_TYPEDevice type [PCI_FIP, PCIE_FIP ...]
device_indexuint8_tDevice index [0 to 255]
device_is_useduint8_t0 : Free device – 1 : Device is used
device_handledevice_handle_tDevice handle
product_numberuint32_tDevice product number
device_versionDEVICE_VERSIONDevice version
fip_speedFIP_SPEEDDevice FIP speed
fip_impedanceFIP_IMPEDANCEDevice FIP Impedance
See also

INSTRUCTION

Definition
struct INSTRUCTION
Members
NameTypeDescription
op_codechar[32]Instruction code for arbiter scan table

USERDEF_STATION_INF

Definition
struct USERDEF_STATION_INF
Members
NameTypeDescription
subscriber_numberuint8_tStation address
subscriber_namechar[255]Station name

USERDEF_ARBITER

Definition
struct USERDEF_ARBITER
Members
NameTypeDescription
ba_max_subscriber_numberuint8_tAddress of the last FIP station connectable to network
ba_priorityuint8_tPriority level (0 [highest] to 15)
ba_max_priorityuint8_tThe highest bus arbiter priority level on the network
ba_optimizationuint8_tBA Optimization mode
[see also <BAOptimization> XML tag]
nb_ba_1_instructionsuint16_tNumber of instructions in BA scan table number 1
ba_1_instructionsINSTRUCTION*Instructions of BA scan table 1
nb_ba_2_instructionsuint16_tNumber of instructions in BA scan table number 2
ba_2_instructionsINSTRUCTION*Instructions of BA scan table 2

USERDEF_VARIABLE

Definition
struct USERDEF_VARIABLE
Members
NameTypeDescription
namechar[255]Variable name
identifieruint16_tVariable identifier
pduuint16_tVariable PDU
[see also <PDU> XML tag]
lengthuint16_tLength
typeuint8_tDirection (0 : OUT, 1 : IN)
refreshment_typeuint8_t 0 : Refreshment not required
1 : Refreshment required
2 : Dynamic refreshment required
[see also <Refreshment> XML tag]
refreshment_perioduint16_t Between 1 [0x0001] and 16 383 [0x3FFF]
It's a time slot multiple.
[see also <Refreshment> XML tag]
promptitude_typeuint8_t 0 : Promptness not required
1 : Promptness required
[see also <Promptness> XML tag]
promptitude_perioduint16_t Between 1 [0x0001] and 16 383 [0x3FFF]
It's a time slot multiple.
[see also <Promptness> XML tag]
msg_channelint16 -1 : No Channel
0 : Aperiodic channel
1 to 8 : Periodic channel
[see also <MessagingService> XML tag]
messages_serviceuint8_t b0 = 1 -> Message reception enabled
b1 = 1 -> Message emission enabled
b6 = 1 -> Aperiodic variable request enabled
[see also <AperiodicService> XML tag]
[see also <MessagingService> XML tag]
See also

USERDEF_MESSAGE

Definition
struct USERDEF_MESSAGE
Members
NameTypeDescription
namechar[255]Message name
typeuint8_t0 : Input Message, 1 : Output Message, 8 : Input File, 9 : Output File
channeluint8_t0: Aperiodic Channel, 1..8: Periodic Channel
acknowledgmentuint8_t0: no, 1: yes
destination_identifieruint16_tDestination ID
destination_segmentuint8_tDestination Segment
source_identifieruint16_tSource ID
source_segmentuint8_tSource Segment
See also

USERDEF_TAG

Definition
struct USERDEF_TAG
Members
NameTypeDescription
tag_namechar[255]Tag name
tag_iduint16_tTag ID
type_namechar[255]Tag type name (Bool, UInt8, Int8, UInt16, Int16, UInt64, Int64, Float, ASCII, Hexa)
type_iduint16_tTag type ID (ex: TAG_TYPES_BOOLEAN ...)
access_rightsuint8_tAccess Rights: 0: Read/Writeable, 1: Readable
descriptionchar[255]Tag description: value unit, comment ...
identifieruint16_tFIP variable identifier
start_bituint16_tStart bit value in FIP frame
stop_bituint16_tStop bit value in FIP frame
endiannessint8_tEndianness: -1: not significant, 0: big-endian, 1: little-endian
See also

FIP_USERCONF

Definition
struct FIP_USERCONF
Members
NameTypeDescription
this_stationUSERDEF_STATION_INF*Station Information
speeduint8_t0 : 31.25 kb/s, 1 : 1 Mb/s, 2 : 2.5 Mb/s, 3 : 5 Mb/s
t_slotuint8_tTSlot
silenceuint8_tSilence_Par
turn_arounduint8_tRPTime_Par
frame_typeuint8_t0 : FIP - 1 : WorldFIP - 2 : SlowFIP
is_arbiterbool0 : no - 1 : yes
arbiterUSERDEF_ARBITER*Arbiter Structure
nb_variablesuint16_tVariables number
variablesUSERDEF_VARIABLE*Variable Structure(s)
nb_messagesuint16_tMessages number
messagesUSERDEF_MESSAGE*Message Structure(s)
nb_tagsuint16_tTags number
tagsUSERDEF_TAG*Tag Structure(s)
See also

OPCUA_LOGIN

Definition
struct OPCUA_LOGIN
Members
NameTypeDescription
usernamechar*Login username
passwordchar*Login password
See also

OPCUA_USERCONF

Definition
struct OPCUA_USERCONF
Members
NameTypeDescription
server_certificate_derchar*Server certificate file (*.der)
Note: If enable_encryption flag is set, this parameter is mandatory else optional.
OPC UA Security Policies Section
enable_encryptionboolEncryption support: 1: enable, 0: disable
Note: If this flag is disable, all other parameters of this section become non-significant.
private_key_derchar*Path to the private key file (*.der)
trust_list_folderchar*Path to the folder containing the trust files
issuer_list_folderchar*Path to the folder containing the issuer files
revocation_list_folderchar*Path to the folder containing the revocation files
disable_unencryptedboolUnencrypted channel: 1: disable, 0: enable
disable_basic128boolBasic128Rsa15 secure channel: 1: disable, 0: enable
disable_basic256boolBasic256 secure channel: 1: disable, 0: enable
disable_basic256Sha256boolBasic256Sha256 secure channel: 1: disable, 0: enable
OPC UA Control Access Section
disable_anonymousboolAnonymous user access: 1: disable, 0: enable
nb_loginsuint16_tNumber of username/password logins to register into OPC UA control access plugin
loginsOPCUA_LOGIN*OPC UA logins
See also

FIP_USERCALLBACKS

Definition
struct FIP_USERCALLBACKS
Members
NameTypeDescription
file_completioncb_file_completionFile completion callback
file_progressioncb_file_progressionFile progression callback
fip_synchrocb_fip_synchroSynchro variable 0x9003 callback (harware irq)
fip_eventcb_fip_eventOther FIP event callback (hardware irq) - [see also fipcore_read_evt]
ctx_ptrvoid*Callbacks context (ex: object pointer in cpp app)
See also

CONSUMED_VARIABLE

Definition
struct CONSUMED_VARIABLE
Members
NameTypeDescription
Pduuint8_tFrame PDU
Lengthuint8_tUseful Data Length
Data_Varuint8_t [128]Useful Data
Production_Statusuint8_tProduction Status Byte
See also

CONSUMED_VARIABLE_TIME

Definition
struct CONSUMED_VARIABLE_TIME
Members
NameTypeDescription
Pduuint8_tFrame PDU
Lengthuint8_tUseful Data Length
Data_Varuint8_t [128]Useful Data
Production_Timeuint32_tProduction Time
Production_Statusuint8_tProduction Status Byte
See also

PRODUCED_VARIABLE

Definition
struct PRODUCED_VARIABLE
Members
NameTypeDescription
Data_Varuint8_t [126]Useful Data
See also

PRESENT_LIST

Definition
struct PRESENT_LIST
Members
NameTypeDescription
Pduuint8_t0x50 (SM_MPS_PDU)
Total_Lengthuint8_t0x46 (70)
Medium_Tab1_Iduint8_t0x80
Medium_Tab1_Lengthuint8_t0x20 (32)
Medium_Tab1uint8_t [32]Subscribers presence on medium 1
Medium_Tab2_Iduint8_t0x80
Medium_Tab2_Lengthuint8_t0x20 (32)
Medium_Tab2uint8_t [32]Subscribers presence on medium 2
See also

MESSAGE_FRAME_OUT

Definition
struct MESSAGE_FRAME_OUT
Members
NameTypeDescription
Msg_Modeuint8_tMSG_SDA / MSG_SDN (yes/no acknowledgment)
Reserved_Byte_0uint8_tReserved
Msg_Length_PFuint8_tHigh order message length
Msg_Length_Pfuint8_tLow order message length
Dest_Add_PFuint8_tRecipient LSAP – High order byte
Dest_Add_Pfuint8_tRecipient LSAP – Low order byte
Dest_Segmentuint8_tRecipient segment number
Src_Add_PFuint8_tSource address – High order byte
Src_Add_Pfuint8_tSource address – Low order byte
Src_Segmentuint8_tSource segment number
Useful_Datauint8_t [256]Useful data
See also

MESSAGE_FRAME_IN

Definition
struct MESSAGE_FRAME_IN
Members
NameTypeDescription
Msg_Reception_Timeuint16_tMessage reception date
Msg_Lengthuint16_tMessage length
Dest_Add_PFuint8_tRecipient LSAP – High order byte
Dest_Add_Pfuint8_tRecipient LSAP – Low order byte
Dest_Segmentuint8_tRecipient segment number
Src_Add_PFuint8_tSource address – High order byte
Src_Add_Pfuint8_tSource address – Low order byte
Src_Segmentuint8_tSource segment number
Useful_Datauint8_t [256]Useful data
See also

BA_PARAMETERS

Definition
struct BA_PARAMETERS
Members
NameTypeDescription
BA_Subscriber_Numberuint16_tNetwork subscriber address
BA_Max_Subscriber_Numberuint16_tAddress of the last network subscriber
BA_Priorityuint16_tBus arbiter priority
BA_Start_Timeuint16_tStart timeout of bus arbiter
BA_Election_Timeuint16_tElection timeout of bus arbiter
See also

FIP_NETWORK_STATUS

Definition
struct FIP_NETWORK_STATUS
Members
NameTypeDescription
No_Error_Channel1uint16_tNumber of transactions (ch. 1)
No_Error_Channel2uint16_tNumber of transactions (ch. 2)
Error_Channel1uint16_tNumber of transaction errors in reception (ch. 1)
Error_Channel2uint16_tNumber of transaction errors in reception (ch. 2)
Error_No_Echouint16_tNumber of transaction errors in emission (ch. 1/ch.2)
Error_Testp_Channel1uint16_tNumber of errors during testing of subscribers present (ch. 1)
Error_Testp_Channel2uint16_tNumber of errors during testing of subscribers present (ch. 2)
BA_Current_Macrocyleuint16_tMacrocycle address of bus arbiter
BA_Statusuint16_tBus arbiter operating status
FIELDUAL_Statusuint16_tFIELDUAL component status
Details

BA_Status : (16-bit)

See enumeration: BA_STATUS_CODE

FIELDUAL_Status : (16-bit)

  • b0 : Channel 1 active (0: no, 1: yes)
  • b1 : Channel 2 active (0: no, 1: yes)
  • b2 : Channel 1 TX Error (0: no, 1: yes)
  • b3 : Channel 2 TX Error ((0: no, 1: yes)
  • b4 : Channel 1 watchdog error (0: no, 1: yes)
  • b5 : Channel 2 watchdog error (0: no, 1: yes)

See enumeration: MEDIUM_STATUS_FLAGS

See also

FIP_STATISTICS

Definition
struct FIP_STATISTICS
Members
NameTypeDescription
Irq_Handled_Countuint32_tInterrupt request produced by the fip device
Irq_Non_Handled_Countuint32_tInterrupt request produced by another device (same IRQ line)
Cycle_Countuint64_tNumber of macrocycles - linked with fip synchro var (0x9003)
Cycle_Timeuint64_tLast macrocycle time (period) - nanosecond resolution
Var_P_Sent_Countuint64_tNumber of variables sent with a network event flag sets to "permanent"
Var_T_Sent_Countuint64_tNumber of variables sent with a network event flag sets to "temporary"
Var_P_Received_Countuint64_tNumber of variables received with a network event flag sets to "permanent"
Var_T_Received_Countuint64_tNumber of variables received with a network event flag sets to "temporary"
Msg_Received_Countuint64_tNumber of message received
Msg_Sent_Countuint64_tNumber of message sent
APU_List_Sent_Countuint64_tNumber of "urgent" requests for aperiodic variable list sent
APN_List_Sent_Countuint64_tNumber of "normal" requests for aperiodic variable list sent
BA_Activity_Countuint64_tCounter of bus arbiter (re)activation
BA_Stop_On_Timeout_Countuint64_tCounter of stopping of bus arbiter following timeout
BA_Stop_On_Anomalies_Countuint64_tCounter of stopping of bus arbiter following network anomalies
BA_Stop_By_User_Countuint64_tCounter of stopping of bus arbiter following user request
BA_Idle_Countuint64_tCounter of return of bus arbiter to idle status
BA_Suspend_Countuint64_tCounter of bus arbiter suspend
See also

cb_fip_synchro

Definition
void (*cb_fip_synchro)(fipcore_device_handle* hnd, void* callback_ctx)
Description
This callback is used to signal an event associated with the reception of a synchronization variable ID(0x9003). This is useful to synchronize the user application with the FIP macrocycle.

WARNING: USB FIP Arbitrator device does not support this callback.
Parameters
Input
hnd
Session handle.

callback_ctx
Pointer to the user context of the callback function.

Output
NONE
Return Value
NONE

cb_fip_event

Definition
void (*cb_fip_event)(fipcore_device_handle* hnd, void* callback_ctx)
Description
This callback is used to signal the following event:

  • Messaging processing events
    They systematically report the sending (with detailed report) or receiving of a message.

  • Aperiodic request processing events
    They systematically report the sending of a list of Urgent or Normal aperiodic requests to the bus arbiter.

  • BA status change events
    They report suspension, activation or return to idle status of the bus arbiter.

  • Variable send/receive events
    These events can be temporary or permanent. A permanent event is sent each time the variable is sent or received, whereas temporary events are reported to the user just once [see also fipcore_def_var_event_by_id].
See also : fipcore_read_evt

WARNING: USB FIP Arbitrator device does not support this callback.
Parameters
Input
hnd
Session handle.

callback_ctx
Pointer to the user context of the callback function.

Output
NONE
Return Value
NONE

cb_file_progression

Definition
void (*cb_file_progression)(fipcore_device_handle* hnd, uint8_t direction, uint16_t dest_id, uint8_t dest_seg, uint16_t src_id, uint8_t src_seg, uint32_t chunk_number, uint32_t total_chunks, double time_elapsed_s, void* callback_ctx)
Description
This callback allows to retrieve file transfer progress information.
Parameters
Input
hnd
Session handle.

direction
File transfer direction (0: File Input, 1: File Output).

dest_id
File destination ID.

dest_seg
File destination segment.

src_id
File source ID.

src_seg
File source segment.

chunk_number
Number of the current package.

total_chunks
Number of total packages that make up the file.

time_elapsed_s
Time elapsed (in seconds) since transfer started.

callback_ctx
Pointer to the user context of the callback function.

Output
NONE
Return Value
NONE

cb_file_completion

Definition
uint32_t (*cb_file_completion)(fipcore_device_handle* hnd, uint8_t direction, uint16_t dest_id, uint8_t dest_seg, uint16_t src_id, uint8_t src_seg, uint32_t error, double transaction_duration_s, char* target_path, void* callback_ctx)
Description
This callback is called when a file transfer is complete.
Parameters
Input
hnd
Session handle.

direction
File transfer direction (0: File Input, 1: File Output).

dest_id
File destination ID.

dest_seg
File destination segment.

src_id
File source ID.

src_seg
File source segment.

error
Return code on completion.

transaction_duration_s
Total transaction time (in seconds).

target_path
Path of the directory where the file is located.

callback_ctx
Pointer to the user context of the callback function.

Output
NONE
Return Value
See Error Codes section.