FipCore
API
Overview
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.
Device - Information
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_typeFIP arbitrator device type.device_indexDevice index comprised between 1 and 9.- Output
device_confStructure 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_devicesNumber 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_confTable of structures containing the information of detected devices.nb_detected_devicesNumber 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_codeError code (32-bits).- Output
NONE- Return Value
- Error string. See Error Codes section.
Device - Access
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_typeFIP arbitrator device type.device_indexDevice index comprised between 1 and 9.- Output
error_codeSee 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
hndSession 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
hndSession handle.- Output
access_modeAccess 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
hndSession handle.access_modeAccess 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
hndSession handle.- Output
led_stateRGB 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
hndSession handle.led_stateRGB 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
hndSession handle.soft_typeExoligent software to test.- Output
NONE- Return Value
- See Error Codes section.
Network - Context Info
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
hndSession handle.- Output
fip_confFIP 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
hndSession handle.identifierVariable ID.- Output
var_confVariable 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
hndSession handle.identifierVariable ID.directionDirection (0 : OUT, 1 : IN).- Output
access_keyVariable 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
hndSession handle.access_keyVariable Access Key.- Output
identifierVariable ID.directionDirection (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
hndSession handle.dest_idDestination ID.dest_segDestination segment.src_idSource ID.src_segSource segment.- Output
msg_confMessage 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
hndSession handle.tag_idTag ID (Mnemonic ID).- Output
tag_confTag 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
hndSession handle.tag_nameTag name (Mnemonic name).- Output
tag_confTag configuration.- Return Value
- See Error Codes section.
Network - Running / Stopping
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
hndSession handle.file_typeType of FIP station configuration file.file_conf_pathPath to FIP station configuration file.user_callbacksStructure 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
hndSession 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
hndSession handle.- Output
NONE- Return Value
- See Error Codes section.
Network - Medium Access
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
hndSession handle.- Output
network_statusStructure 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
hndSession handle.fieldual_cmdMedium 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
- bit0 and bit1 : Channel 1 Selection
- Output
NONE- Return Value
- See Error Codes section.
Network - Variable Access
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
hndSession handle.identifierVariable identifier (ID).p_varStructure containing data to send.
- 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
hndSession handle.identifierVariable identifier (ID).- Output
c_varStructure containing read data.is_promptPromptness validity.is_refreshedRefreshment validity.
- 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
hndSession handle.identifierVariable identifier (ID).- Output
c_varStructure containing read data.is_promptPromptness validity.is_refreshedRefreshment validity.
- 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
hndSession handle.identifierVariable identifier (ID).- Output
c_var_timeStructure containing read data.production_timeTime elapsed between the variable writing by the user and its emission on the network (in μs).transmission_timeTransfer time of the variable on the network (in μs). This time is calculated based on the variable length and the network speed.consumption_timeTime elapsed between the reception of the variable from the network and the reading by the user (in μs).reception_timetransmission_time + consumption_timeis_promptPromptness validity.is_refreshedRefreshment validity.
- 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
hndSession handle.- Output
present_listStructure 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
hndSession handle.identifierVariable identifier (ID).mode0 - 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
hndSession handle.fifo_type0 - 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
hndSession handle.identifierVariable identifier (ID).event_codeEvent 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.
Network - Message Access
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
hndSession handle.channel_numberThe channel on which the message is to be sent.
- 0: Aperiodic messaging channel.
- 1 to 8: Periodic messaging channel.
message_frame_outStructure 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
hndSession handle.- Output
message_frame_inStructure 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
hndSession handle.channel_numberThe transmission channel that must be purged.
- 0: Aperiodic messaging channel.
- 1 to 8: Periodic messaging channel.
- Output
nb_blocks_freedNumber of freed message blocks.blocks_freed_tabTable of freed block numbers. Up to 64 * uint16_t.- Return Value
- See Error Codes section.
Network - File Transfer
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
hndSession handle.directory_pathFolder 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
hndSession handle.channel_numberTransmission channel type.
- 0: Aperiodic messaging channel.
- 1 to 8: Periodic messaging channel.
dest_idFile destination ID.dest_segFile destination segment.src_idFile source ID.src_segFile source segment.file_pathPath 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
hndSession handle.- Output
NONE- Return Value
- See Error Codes section.
Network - Tag Access
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
hndSession handle.tag_idTag identifier (Tag ID).dataPointer 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
hndSession handle.tag_nameTag name.dataPointer 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
hndSession handle.tag_idTag identifier (Tag ID).- Output
dataPointer 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
hndSession handle.tag_nameTag name.- Output
dataPointer to the value to be read.- Return Value
- See Error Codes section.
Network - Bus Arbiter Access
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
hndSession handle.ba_numberScan 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
hndSession 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.
- Parameters
- Input
hndSession handle.ba_continue_addressRestart 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
hndSession handle.ba_numberScan 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.
- Parameters
- Input
hndSession 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
hndSession handle.ba_parametersBus arbiter parameters.- Output
NONE- Return Value
- See Error Codes section.
Network - Event Access
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
hndSession handle.- Output
event_codeEvent code received [see FIP_EVENT_CODE enumeration].event_parameterAdditional 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

- 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
- MSG_SDN_ACK :
- FIFO: FIFO emission number (0: aperiodic - 1..8: periodic)
- Block: Block number in FIFO emission (0 to 63)
- Cr_Emission: Emission report
- FIP_EVT_BA_SUSPEND :
event_parameter = BA suspension address program (16-bit address in zone reserved for BA)
See also : fipcore_continue_ba
- FIP_EVT_SEND_VAR_P / FIP_EVT_SEND_VAR_T :
- Return Value
- See Error Codes section.
Network - Statistical Information
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.
- Parameters
- Input
hndSession 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.
- Parameters
- Input
hndSession handle.- Output
statsStatistics structure.- Return Value
- See Error Codes section.
Network - OPC UA Server
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
hndSession handle.portTCP Port.opc_confOPC 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
hndSession handle.wait_internalShould 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
timeoutReturns 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
hndSession 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
hndSession handle.portTCP Port.runningServer state (Force to false to exit the function).opc_confOPC 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.
Enumerations
EXO_FILE_TYPE
- Definition
-
enum EXO_FILE_TYPE { XML, CNF } - Description
- This enum describes the file types supported by the Exoligent softwares.
- Values
-
Constant Value Description XML 0 The file has "xml" structure type CNF 1 The 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
-
Constant Value Description PCI_PCIE_TYPE 1 PCI/PCIe FIP Arbiter board (pci, pcie, pci104, pcie104, pxi, pxie, mpcie) USB_TYPE 2 USB 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
-
Constant Value Description FIPCORE 0 API library to control a FIP Arbitrator device FIPCOREPLUS 1 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)
FIPLABS 2 GUI for designing, controlling and analyzing a FIP network (based on FipCore library) - FipBusView library (lvlib): To control a FIP Arbitrator device from Labview.
- 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
-
Constant Value Description EXO_SUBSYSID_OLD_PCI 0x9050 PCI FIP Arbiter on copper (old model) EXO_SUBSYSID_PCI 0x5201 PCI FIP Arbiter on copper EXO_SUBSYSID_PCIE 0x5301 PCIe FIP Arbiter on copper EXO_SUBSYSID_PCI104 0x5401 PCI/104 FIP Arbiter on copper EXO_SUBSYSID_PCIE104 0x5501 PCIe/104 FIP Arbiter on copper EXO_SUBSYSID_PXI 0x5601 PXI FIP Arbiter on copper EXO_SUBSYSID_PXIE 0x5701 PXIe FIP Arbiter on copper EXO_SUBSYSID_MPCIE 0x5801 mPCIe FIP Arbiter on copper EXO_SUBSYSID_CPCI 0x5901 cPCI FIP Arbiter on copper EXO_SUBSYSID_PCI_OPT 0x7201 PCI FIP Arbiter on optical fiber EXO_SUBSYSID_PCIE_OPT 0x7301 PCIe FIP Arbiter on optical fiber EXO_SUBSYSID_PCI104_OPT 0x7401 PCI/104 FIP Arbiter on optical fiber EXO_SUBSYSID_PCIE104_OPT 0x7501 PCIe/104 FIP Arbiter on optical fiber EXO_SUBSYSID_PXI_OPT 0x7601 PXI FIP Arbiter on optical fiber EXO_SUBSYSID_PXIE_OPT 0x7701 PXIe FIP Arbiter on optical fiber EXO_SUBSYSID_MPCIE_OPT 0x7801 mPCIe FIP Arbiter on optical fiber EXO_SUBSYSID_CPCI_OPT 0x7901 cPCI 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
-
Constant Value Description SPEED_31K25 0 FIP speed at 31.25 Kbps SPEED_1M 1 FIP speed at 1 Mbps SPEED_2M5 2 FIP speed at 2.5 Mbps SPEED_5M 3 FIP speed at 5 Mbps - See also
FIP_IMPEDANCE
- Definition
-
enum FIP_IMPEDANCE { IMPEDANCE_150, IMPEDANCE_120 } - Description
- This enum describes the FIP impedance.
- Values
-
Constant Value Description IMPEDANCE_150 0 Network 150 Ω IMPEDANCE_120 1 Network 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
-
Constant Value Description FRAME_TYPE_FIP 0 FIP frame FRAME_TYPE_WORLDFIP 1 WorldFIP frame FRAME_TYPE_SLOWFIP 2 SlowFIP 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
-
Constant Value Description BLACK 0 Switched off LED BLUE 1 Blue LED GREEN 2 Green LED BLUE_SKY 3 Blue Sky LED RED 4 Red LED FUSCHIA 5 Fuschia LED YELLOW 6 Yellow LED WHITE 7 White 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
-
Constant Value Description MEDIUM_CMD_CLR_CHANNELS_ERR 0x0010 Clear channels errors MEDIUM_CMD_RST_CH1 0x0020 Reset channel 2 MEDIUM_CMD_RST_CH2 0x0040 Reset channel 1 MEDIUM_CMD_ACTIVATE_CH1 0x0009 Only channel 1 selection MEDIUM_CMD_ACTIVATE_CH2 0x0006 Only channel 2 selection MEDIUM_CMD_ACTIVATE_CH1_AND_CH2 0x0005 Both 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
-
Constant Value Description MEDIUM_STATUS_CH1_VALID 0x0001 Channel 1 active MEDIUM_STATUS_CH2_VALID 0x0002 Channel 2 active MEDIUM_STATUS_CH1_TX_ERROR 0x0004 Channel 1 TX Error MEDIUM_STATUS_CH2_TX_ERROR 0x0008 Channel 2 TX Error MEDIUM_STATUS_CH1_WATCHDOG 0x0010 Channel 1 watchdog error MEDIUM_STATUS_CH2_WATCHDOG 0x0020 Channel 2 watchdog error - See also
fipcore_get_medium, FIP_NETWORK_STATUS (FIELDUAL_Status)
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
-
Constant Value Description BA_STATUS_STOPPED 0x0000 Bus arbiter stopped BA_STATUS_STARTING 0x0003 Bus arbiter in start-up phase BA_STATUS_IDLE 0x0007 Bus arbiter in idle - Another BA is already active BA_STATUS_MACRO_END 0x8022 End of macrocycle BA_STATUS_SENDING_ID_DAT 0x8023 ID_DAT frame emission in progress BA_STATUS_SENDING_ID_MSG 0x8025 ID_MSG frame emission in progress BA_STATUS_TESTING 0x8028 Presence test in progress BA_STATUS_TESTING_END 0x8029 End of presence test BA_STATUS_PENDING 0x8038 Bus arbiter in pending - Wait for user action BA_STATUS_APER_WINDOW 0x800B Processing of aperiodic requests for variables BA_STATUS_MSG_WINDOW 0x8004 Processing of aperiodic requests for messages BA_STATUS_WAITING_TIME 0x8010 Internal re-synchronization BA_STATUS_WAITING_SYNC 0x8031 External re-synchronization BA_STATUS_WAITING_SYNC_SILENT 0x8032 External re-synchronization - Silence - See also
fipcore_get_medium, FIP_NETWORK_STATUS (BA_Status)
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
-
Constant Value Description FIP_EVT_NONE 0x0000 No event FIP_EVT_SEND_VAR_P 0x8100 Sending of a variable - permanent FIP_EVT_SEND_VAR_T 0x0100 Sending of a variable - temporary FIP_EVT_RECEIVE_VAR_P 0x8200 Reception of a variable - permanent FIP_EVT_RECEIVE_VAR_T 0x0200 Reception of a variable - temporary FIP_EVT_RECEIVE_MSG 0x0240 Reception of a message FIP_EVT_SEND_MSG 0x0140 Sending of a message FIP_EVT_SEND_APU 0x0130 Sending of a list of urgent aperiodic requests FIP_EVT_SEND_APN 0x0131 Sending of a list of normal aperiodic requests FIP_EVT_BA_ACTIVITY 0x0400 Bus arbiter reactivation (active on network) FIP_EVT_BA_STOP1 0x0401 Stopping of bus arbiter following a timeout recorded on execution of program instructions BA_SUSPEND or BA_WAIT_SYNC FIP_EVT_BA_STOP2 0x0402 Stopping of bus arbiter following detection of network anomalies or decoding of an unknown instruction code FIP_EVT_BA_STOP3 0x0404 Stopping of bus arbiter following user request FIP_EVT_BA_IDLE 0x0408 Return of bus arbiter to idle status FIP_EVT_BA_SUSPEND0 0x0500 Suspension of bus arbiter program following decoding of the macro–instruction BA_SUSPEND (here on event number 0) ... 0x0501 to 0x05fe Other codes relative to the suspension of bus arbiter program FIP_EVT_BA_SUSPEND255 0x05ff Suspension 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
-
Constant Value Description IDLE 0 No file transfer in progress IN_PROGRESS 1 File transfer in progress COMPLETE 2 File transfer complete ABORTED 3 File transfer aborted
Structures
DEVICE_VERSION
- Definition
-
struct DEVICE_VERSION - Members
-
Name Type Description major uint8_tMajor number minor uint8_tMinor number revision uint8_tRevision number
FIP_DEVICECONF
- Definition
-
struct FIP_DEVICECONF - Members
-
Name Type Description device_type EXO_DEVICE_TYPEDevice type [PCI_FIP, PCIE_FIP ...] device_index uint8_tDevice index [0 to 255] device_is_used uint8_t0 : Free device – 1 : Device is used device_handle device_handle_tDevice handle product_number uint32_tDevice product number device_version DEVICE_VERSIONDevice version fip_speed FIP_SPEEDDevice FIP speed fip_impedance FIP_IMPEDANCEDevice FIP Impedance - See also
INSTRUCTION
- Definition
-
struct INSTRUCTION - Members
-
Name Type Description op_code char[32]Instruction code for arbiter scan table
USERDEF_STATION_INF
- Definition
-
struct USERDEF_STATION_INF - Members
-
Name Type Description subscriber_number uint8_tStation address subscriber_name char[255]Station name
USERDEF_ARBITER
- Definition
-
struct USERDEF_ARBITER - Members
-
Name Type Description ba_max_subscriber_number uint8_tAddress of the last FIP station connectable to network ba_priority uint8_tPriority level (0 [highest] to 15) ba_max_priority uint8_tThe highest bus arbiter priority level on the network ba_optimization uint8_tBA Optimization mode
[see also <BAOptimization> XML tag]nb_ba_1_instructions uint16_tNumber of instructions in BA scan table number 1 ba_1_instructions INSTRUCTION*Instructions of BA scan table 1 nb_ba_2_instructions uint16_tNumber of instructions in BA scan table number 2 ba_2_instructions INSTRUCTION*Instructions of BA scan table 2
USERDEF_VARIABLE
- Definition
-
struct USERDEF_VARIABLE - Members
-
Name Type Description name char[255]Variable name identifier uint16_tVariable identifier pdu uint16_tVariable PDU
[see also <PDU> XML tag]length uint16_tLength type uint8_tDirection (0 : OUT, 1 : IN) refreshment_type uint8_t0 : Refreshment not required
1 : Refreshment required
2 : Dynamic refreshment required
[see also <Refreshment> XML tag]refreshment_period uint16_tBetween 1 [0x0001] and 16 383 [0x3FFF]
It's a time slot multiple.
[see also <Refreshment> XML tag]promptitude_type uint8_t0 : Promptness not required
1 : Promptness required
[see also <Promptness> XML tag]promptitude_period uint16_tBetween 1 [0x0001] and 16 383 [0x3FFF]
It's a time slot multiple.
[see also <Promptness> XML tag]msg_channel int16-1 : No Channel
0 : Aperiodic channel
1 to 8 : Periodic channel
[see also <MessagingService> XML tag]messages_service uint8_tb0 = 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
-
Name Type Description name char[255]Message name type uint8_t0 : Input Message, 1 : Output Message, 8 : Input File, 9 : Output File channel uint8_t0: Aperiodic Channel, 1..8: Periodic Channel acknowledgment uint8_t0: no, 1: yes destination_identifier uint16_tDestination ID destination_segment uint8_tDestination Segment source_identifier uint16_tSource ID source_segment uint8_tSource Segment - See also
USERDEF_TAG
- Definition
-
struct USERDEF_TAG - Members
-
Name Type Description tag_name char[255]Tag name tag_id uint16_tTag ID type_name char[255]Tag type name (Bool, UInt8, Int8, UInt16, Int16, UInt64, Int64, Float, ASCII, Hexa) type_id uint16_tTag type ID (ex: TAG_TYPES_BOOLEAN ...) access_rights uint8_tAccess Rights: 0: Read/Writeable, 1: Readable description char[255]Tag description: value unit, comment ... identifier uint16_tFIP variable identifier start_bit uint16_tStart bit value in FIP frame stop_bit uint16_tStop bit value in FIP frame endianness int8_tEndianness: -1: not significant, 0: big-endian, 1: little-endian - See also
FIP_USERCONF
- Definition
-
struct FIP_USERCONF - Members
-
Name Type Description this_station USERDEF_STATION_INF*Station Information speed uint8_t0 : 31.25 kb/s, 1 : 1 Mb/s, 2 : 2.5 Mb/s, 3 : 5 Mb/s t_slot uint8_tTSlot silence uint8_tSilence_Par turn_around uint8_tRPTime_Par frame_type uint8_t0 : FIP - 1 : WorldFIP - 2 : SlowFIP is_arbiter bool0 : no - 1 : yes arbiter USERDEF_ARBITER*Arbiter Structure nb_variables uint16_tVariables number variables USERDEF_VARIABLE*Variable Structure(s) nb_messages uint16_tMessages number messages USERDEF_MESSAGE*Message Structure(s) nb_tags uint16_tTags number tags USERDEF_TAG*Tag Structure(s) - See also
OPCUA_LOGIN
- Definition
-
struct OPCUA_LOGIN - Members
-
Name Type Description username char*Login username password char*Login password - See also
OPCUA_USERCONF
- Definition
-
struct OPCUA_USERCONF - Members
-
Name Type Description server_certificate_der char*Server certificate file (*.der)
Note: If enable_encryption flag is set, this parameter is mandatory else optional.OPC UA Security Policies Section enable_encryption boolEncryption support: 1: enable, 0: disable
Note: If this flag is disable, all other parameters of this section become non-significant.private_key_der char*Path to the private key file (*.der) trust_list_folder char*Path to the folder containing the trust files issuer_list_folder char*Path to the folder containing the issuer files revocation_list_folder char*Path to the folder containing the revocation files disable_unencrypted boolUnencrypted channel: 1: disable, 0: enable disable_basic128 boolBasic128Rsa15 secure channel: 1: disable, 0: enable disable_basic256 boolBasic256 secure channel: 1: disable, 0: enable disable_basic256Sha256 boolBasic256Sha256 secure channel: 1: disable, 0: enable OPC UA Control Access Section disable_anonymous boolAnonymous user access: 1: disable, 0: enable nb_logins uint16_tNumber of username/password logins to register into OPC UA control access plugin logins OPCUA_LOGIN*OPC UA logins - See also
FIP_USERCALLBACKS
- Definition
-
struct FIP_USERCALLBACKS - Members
-
Name Type Description file_completion cb_file_completionFile completion callback file_progression cb_file_progressionFile progression callback fip_synchro cb_fip_synchroSynchro variable 0x9003 callback (harware irq) fip_event cb_fip_eventOther FIP event callback (hardware irq) - [see also fipcore_read_evt] ctx_ptr void*Callbacks context (ex: object pointer in cpp app) - See also
CONSUMED_VARIABLE
- Definition
-
struct CONSUMED_VARIABLE - Members
-
Name Type Description Pdu uint8_tFrame PDU Length uint8_tUseful Data Length Data_Var uint8_t [128]Useful Data Production_Status uint8_tProduction Status Byte - See also
CONSUMED_VARIABLE_TIME
- Definition
-
struct CONSUMED_VARIABLE_TIME - Members
-
Name Type Description Pdu uint8_tFrame PDU Length uint8_tUseful Data Length Data_Var uint8_t [128]Useful Data Production_Time uint32_tProduction Time Production_Status uint8_tProduction Status Byte - See also
PRODUCED_VARIABLE
- Definition
-
struct PRODUCED_VARIABLE - Members
-
Name Type Description Data_Var uint8_t [126]Useful Data - See also
PRESENT_LIST
- Definition
-
struct PRESENT_LIST - Members
-
Name Type Description Pdu uint8_t0x50 (SM_MPS_PDU) Total_Length uint8_t0x46 (70) Medium_Tab1_Id uint8_t0x80 Medium_Tab1_Length uint8_t0x20 (32) Medium_Tab1 uint8_t [32]Subscribers presence on medium 1 Medium_Tab2_Id uint8_t0x80 Medium_Tab2_Length uint8_t0x20 (32) Medium_Tab2 uint8_t [32]Subscribers presence on medium 2 - See also
MESSAGE_FRAME_OUT
- Definition
-
struct MESSAGE_FRAME_OUT - Members
-
Name Type Description Msg_Mode uint8_tMSG_SDA / MSG_SDN (yes/no acknowledgment) Reserved_Byte_0 uint8_tReserved Msg_Length_PF uint8_tHigh order message length Msg_Length_Pf uint8_tLow order message length Dest_Add_PF uint8_tRecipient LSAP – High order byte Dest_Add_Pf uint8_tRecipient LSAP – Low order byte Dest_Segment uint8_tRecipient segment number Src_Add_PF uint8_tSource address – High order byte Src_Add_Pf uint8_tSource address – Low order byte Src_Segment uint8_tSource segment number Useful_Data uint8_t [256]Useful data - See also
MESSAGE_FRAME_IN
- Definition
-
struct MESSAGE_FRAME_IN - Members
-
Name Type Description Msg_Reception_Time uint16_tMessage reception date Msg_Length uint16_tMessage length Dest_Add_PF uint8_tRecipient LSAP – High order byte Dest_Add_Pf uint8_tRecipient LSAP – Low order byte Dest_Segment uint8_tRecipient segment number Src_Add_PF uint8_tSource address – High order byte Src_Add_Pf uint8_tSource address – Low order byte Src_Segment uint8_tSource segment number Useful_Data uint8_t [256]Useful data - See also
BA_PARAMETERS
- Definition
-
struct BA_PARAMETERS - Members
-
Name Type Description BA_Subscriber_Number uint16_tNetwork subscriber address BA_Max_Subscriber_Number uint16_tAddress of the last network subscriber BA_Priority uint16_tBus arbiter priority BA_Start_Time uint16_tStart timeout of bus arbiter BA_Election_Time uint16_tElection timeout of bus arbiter - See also
FIP_NETWORK_STATUS
- Definition
-
struct FIP_NETWORK_STATUS - Members
-
Name Type Description No_Error_Channel1 uint16_tNumber of transactions (ch. 1) No_Error_Channel2 uint16_tNumber of transactions (ch. 2) Error_Channel1 uint16_tNumber of transaction errors in reception (ch. 1) Error_Channel2 uint16_tNumber of transaction errors in reception (ch. 2) Error_No_Echo uint16_tNumber of transaction errors in emission (ch. 1/ch.2) Error_Testp_Channel1 uint16_tNumber of errors during testing of subscribers present (ch. 1) Error_Testp_Channel2 uint16_tNumber of errors during testing of subscribers present (ch. 2) BA_Current_Macrocyle uint16_tMacrocycle address of bus arbiter BA_Status uint16_tBus arbiter operating status FIELDUAL_Status uint16_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
-
Name Type Description Irq_Handled_Count uint32_tInterrupt request produced by the fip device Irq_Non_Handled_Count uint32_tInterrupt request produced by another device (same IRQ line) Cycle_Count uint64_tNumber of macrocycles - linked with fip synchro var (0x9003) Cycle_Time uint64_tLast macrocycle time (period) - nanosecond resolution Var_P_Sent_Count uint64_tNumber of variables sent with a network event flag sets to "permanent" Var_T_Sent_Count uint64_tNumber of variables sent with a network event flag sets to "temporary" Var_P_Received_Count uint64_tNumber of variables received with a network event flag sets to "permanent" Var_T_Received_Count uint64_tNumber of variables received with a network event flag sets to "temporary" Msg_Received_Count uint64_tNumber of message received Msg_Sent_Count uint64_tNumber of message sent APU_List_Sent_Count uint64_tNumber of "urgent" requests for aperiodic variable list sent APN_List_Sent_Count uint64_tNumber of "normal" requests for aperiodic variable list sent BA_Activity_Count uint64_tCounter of bus arbiter (re)activation BA_Stop_On_Timeout_Count uint64_tCounter of stopping of bus arbiter following timeout BA_Stop_On_Anomalies_Count uint64_tCounter of stopping of bus arbiter following network anomalies BA_Stop_By_User_Count uint64_tCounter of stopping of bus arbiter following user request BA_Idle_Count uint64_tCounter of return of bus arbiter to idle status BA_Suspend_Count uint64_tCounter of bus arbiter suspend - See also
Callbacks
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.
- Parameters
- Input
hndSession handle.callback_ctxPointer 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].
- Messaging processing events
- See also : fipcore_read_evt
- Parameters
- Input
hndSession handle.callback_ctxPointer 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
hndSession handle.directionFile transfer direction (0: File Input, 1: File Output).dest_idFile destination ID.dest_segFile destination segment.src_idFile source ID.src_segFile source segment.chunk_numberNumber of the current package.total_chunksNumber of total packages that make up the file.time_elapsed_sTime elapsed (in seconds) since transfer started.callback_ctxPointer 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
hndSession handle.directionFile transfer direction (0: File Input, 1: File Output).dest_idFile destination ID.dest_segFile destination segment.src_idFile source ID.src_segFile source segment.errorReturn code on completion.transaction_duration_sTotal transaction time (in seconds).target_pathPath of the directory where the file is located.callback_ctxPointer to the user context of the callback function.- Output
- NONE
- Return Value
- See Error Codes section.