1.10.2.6. RSU Client API
| Prototype: | rsu_client_get_slot_count(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Get the number of predefined slots and display the number of slots. | 
| Prototype: | rsu_client_get_slot_by_name (char *name) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return error code 18. | 
| Description: | Get slot number based on name and display it. | 
| Prototype: | rsu_client_list_slot_attribute(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | List the attribute info from the selected slot. The attributes are image name, offset, size and priority level. | 
| Prototype: | rsu_client_get_slot_size(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Get the size for a selected slot and display slot size in bytes. | 
| Prototype: | rsu_client_get_priority(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Get the priority for a selected slot and display the priority of the selected slot. | 
| Prototype: | rsu_client_slot_enable(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Set the selected slot as the highest priority. | 
| Prototype: | rsu_client_slot_disable(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Disable selected slot but not erase it. | 
| Prototype: | rsu_client_request_slot_be_loaded (int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Request the selected slot be loaded. | 
| Prototype: | rsu_client_erase_image(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Erase the application image from a selected slot. | 
| Prototype: | rsu_client_request_factory_be_loaded(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Request the factory image be loaded. | 
| Prototype: | rsu_client_add_image (int slot_num, void *buf, int size) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Add a new image to the selected slot and make it the highest priority. The slot must be erased first. | 
| Prototype: | rsu_client_verify_data(int slot_num, void *buf, int size) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Verify the Intel FPGA bitstream in the selected slot. | 
| Prototype: | rsu_client_copy_to_buf(int slot_num, alt_u64 address) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Read the data from a slot then write to an address. | 
| Prototype: | rsu_client_status_log(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Print the status log. | 
| Prototype: | rsu_client_clear_error_status(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Clear errors from the current RSU status. | 
| Prototype: | rsu_client_display_dcmf_version(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Display the four decision firmware versions. | 
| Prototype: | rsu_client_display_dcmf_status(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Display the status for four decision firmware. | 
| Prototype: | rsu_client_display_max_retry(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Display the max retry parameter | 
| Prototype: | rsu_client_slot_create(char *slot_name, alt_u64 slot_address, unsigned int slot_size) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Create a new slot in the SPT, using unused space. | 
| Prototype: | rsu_client_slot_rename (int slot, char *name) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return error code18. | 
| Description: | Rename the selected slot and display it. | 
| Prototype: | rsu_client_slot_delete(int slot_num) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Delete selected slot, freeing up allocated space. | 
| Prototype: | rsu_client_restore_spt (alt_u64 address) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Restore the SPT from an address. | 
| Prototype: | rsu_client_save_spt (alt_u64 address) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Save the working SPT to an address. | 
| Prototype: | rsu_client_create_empty_cpb(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Create an empty CPB, which includes the CPB header only. All entries are marked as unused. | 
| Prototype: | rsu_client_restore_cpb (alt_u64 address) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Restore the CPB from an address. | 
| Prototype: | rsu_client_save_cpb(alt_u64 address) | 
| Parameters: | 
 | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Save the working CPB to an address. | 
| Prototype: | rsu_client_check_running_factory(void) | 
| Parameters: | - | 
| Return: | Return 0 for success, or otherwise return -1 on error. | 
| Description: | Check if currently running image is the factory image. | 
  18 Refer to Error Codes for more information.