Implement symbol visibility for libethercat
This commit is contained in:
parent
c3826c7758
commit
b78e5e8c7d
188
include/ecrt.h
188
include/ecrt.h
|
|
@ -196,6 +196,18 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** Symbol visibility control macro.
|
||||
*/
|
||||
#ifndef EC_PUBLIC_API
|
||||
# if defined(ethercat_EXPORTS) && !defined(__KERNEL__)
|
||||
# define EC_PUBLIC_API __attribute__ ((visibility ("default")))
|
||||
# else
|
||||
# define EC_PUBLIC_API
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/** End of list marker.
|
||||
*
|
||||
* This can be used with ecrt_slave_config_pdos().
|
||||
|
|
@ -551,7 +563,7 @@ extern "C" {
|
|||
*
|
||||
* \return Value of ECRT_VERSION_MAGIC() at EtherCAT master compile time.
|
||||
*/
|
||||
unsigned int ecrt_version_magic(void);
|
||||
EC_PUBLIC_API unsigned int ecrt_version_magic(void);
|
||||
|
||||
/** Requests an EtherCAT master for realtime operation.
|
||||
*
|
||||
|
|
@ -568,7 +580,7 @@ unsigned int ecrt_version_magic(void);
|
|||
*
|
||||
* \return Pointer to the reserved master, otherwise \a NULL.
|
||||
*/
|
||||
ec_master_t *ecrt_request_master(
|
||||
EC_PUBLIC_API ec_master_t *ecrt_request_master(
|
||||
unsigned int master_index /**< Index of the master to request. */
|
||||
);
|
||||
|
||||
|
|
@ -585,7 +597,7 @@ ec_master_t *ecrt_request_master(
|
|||
*
|
||||
* \return Pointer to the opened master, otherwise \a NULL.
|
||||
*/
|
||||
ec_master_t *ecrt_open_master(
|
||||
EC_PUBLIC_API ec_master_t *ecrt_open_master(
|
||||
unsigned int master_index /**< Index of the master to request. */
|
||||
);
|
||||
|
||||
|
|
@ -601,7 +613,7 @@ ec_master_t *ecrt_open_master(
|
|||
*
|
||||
* If the master was activated, ecrt_master_deactivate() is called internally.
|
||||
*/
|
||||
void ecrt_release_master(
|
||||
EC_PUBLIC_API void ecrt_release_master(
|
||||
ec_master_t *master /**< EtherCAT master */
|
||||
);
|
||||
|
||||
|
|
@ -618,7 +630,7 @@ void ecrt_release_master(
|
|||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
int ecrt_master_reserve(
|
||||
EC_PUBLIC_API int ecrt_master_reserve(
|
||||
ec_master_t *master /**< EtherCAT master */
|
||||
);
|
||||
|
||||
|
|
@ -665,7 +677,7 @@ void ecrt_master_callbacks(
|
|||
*
|
||||
* \return Pointer to the new domain on success, else NULL.
|
||||
*/
|
||||
ec_domain_t *ecrt_master_create_domain(
|
||||
EC_PUBLIC_API ec_domain_t *ecrt_master_create_domain(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -699,7 +711,7 @@ ec_domain_t *ecrt_master_create_domain(
|
|||
* \retval >0 Pointer to the slave configuration structure.
|
||||
* \retval NULL in the error case.
|
||||
*/
|
||||
ec_slave_config_t *ecrt_master_slave_config(
|
||||
EC_PUBLIC_API ec_slave_config_t *ecrt_master_slave_config(
|
||||
ec_master_t *master, /**< EtherCAT master */
|
||||
uint16_t alias, /**< Slave alias. */
|
||||
uint16_t position, /**< Slave position. */
|
||||
|
|
@ -715,7 +727,7 @@ ec_slave_config_t *ecrt_master_slave_config(
|
|||
*
|
||||
* \return 0 on success, otherwise negative error code.
|
||||
*/
|
||||
int ecrt_master_select_reference_clock(
|
||||
EC_PUBLIC_API int ecrt_master_select_reference_clock(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
ec_slave_config_t *sc /**< Slave config of the slave to use as the
|
||||
* reference slave (or NULL). */
|
||||
|
|
@ -730,7 +742,7 @@ int ecrt_master_select_reference_clock(
|
|||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
int ecrt_master(
|
||||
EC_PUBLIC_API int ecrt_master(
|
||||
ec_master_t *master, /**< EtherCAT master */
|
||||
ec_master_info_t *master_info /**< Structure that will output the
|
||||
information */
|
||||
|
|
@ -746,7 +758,7 @@ int ecrt_master(
|
|||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
int ecrt_master_get_slave(
|
||||
EC_PUBLIC_API int ecrt_master_get_slave(
|
||||
ec_master_t *master, /**< EtherCAT master */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
ec_slave_info_t *slave_info /**< Structure that will output the
|
||||
|
|
@ -763,7 +775,7 @@ int ecrt_master_get_slave(
|
|||
*
|
||||
* \return zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_master_get_sync_manager(
|
||||
EC_PUBLIC_API int ecrt_master_get_sync_manager(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint8_t sync_index, /**< Sync manager index. Must be less
|
||||
|
|
@ -780,7 +792,7 @@ int ecrt_master_get_sync_manager(
|
|||
*
|
||||
* \retval zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_master_get_pdo(
|
||||
EC_PUBLIC_API int ecrt_master_get_pdo(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint8_t sync_index, /**< Sync manager index. Must be less
|
||||
|
|
@ -796,7 +808,7 @@ int ecrt_master_get_pdo(
|
|||
*
|
||||
* \retval zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_master_get_pdo_entry(
|
||||
EC_PUBLIC_API int ecrt_master_get_pdo_entry(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint8_t sync_index, /**< Sync manager index. Must be less
|
||||
|
|
@ -817,7 +829,7 @@ int ecrt_master_get_pdo_entry(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_master_sdo_download(
|
||||
EC_PUBLIC_API int ecrt_master_sdo_download(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint16_t index, /**< Index of the SDO. */
|
||||
|
|
@ -837,7 +849,7 @@ int ecrt_master_sdo_download(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_master_sdo_download_complete(
|
||||
EC_PUBLIC_API int ecrt_master_sdo_download_complete(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint16_t index, /**< Index of the SDO. */
|
||||
|
|
@ -855,7 +867,7 @@ int ecrt_master_sdo_download_complete(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_master_sdo_upload(
|
||||
EC_PUBLIC_API int ecrt_master_sdo_upload(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint16_t index, /**< Index of the SDO. */
|
||||
|
|
@ -874,7 +886,7 @@ int ecrt_master_sdo_upload(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_master_write_idn(
|
||||
EC_PUBLIC_API int ecrt_master_write_idn(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint8_t drive_no, /**< Drive number. */
|
||||
|
|
@ -893,7 +905,7 @@ int ecrt_master_write_idn(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_master_read_idn(
|
||||
EC_PUBLIC_API int ecrt_master_read_idn(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint16_t slave_position, /**< Slave position. */
|
||||
uint8_t drive_no, /**< Drive number. */
|
||||
|
|
@ -923,7 +935,7 @@ int ecrt_master_read_idn(
|
|||
*
|
||||
* \return 0 in case of success, else < 0
|
||||
*/
|
||||
int ecrt_master_activate(
|
||||
EC_PUBLIC_API int ecrt_master_activate(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -937,7 +949,7 @@ int ecrt_master_activate(
|
|||
*
|
||||
* This method should not be called in realtime context.
|
||||
*/
|
||||
void ecrt_master_deactivate(
|
||||
EC_PUBLIC_API void ecrt_master_deactivate(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -951,7 +963,7 @@ void ecrt_master_deactivate(
|
|||
* \retval 0 on success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_master_set_send_interval(
|
||||
EC_PUBLIC_API int ecrt_master_set_send_interval(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
size_t send_interval /**< Send interval in us */
|
||||
);
|
||||
|
|
@ -964,7 +976,7 @@ int ecrt_master_set_send_interval(
|
|||
* Has to be called cyclically by the application after ecrt_master_activate()
|
||||
* has returned.
|
||||
*/
|
||||
void ecrt_master_send(
|
||||
EC_PUBLIC_API void ecrt_master_send(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -978,7 +990,7 @@ void ecrt_master_send(
|
|||
* Has to be called cyclically by the realtime application after
|
||||
* ecrt_master_activate() has returned.
|
||||
*/
|
||||
void ecrt_master_receive(
|
||||
EC_PUBLIC_API void ecrt_master_receive(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -987,7 +999,7 @@ void ecrt_master_receive(
|
|||
* This method has to be called in the send callback function passed via
|
||||
* ecrt_master_callbacks() to allow the sending of non-application datagrams.
|
||||
*/
|
||||
void ecrt_master_send_ext(
|
||||
EC_PUBLIC_API void ecrt_master_send_ext(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -998,7 +1010,7 @@ void ecrt_master_send_ext(
|
|||
* This method returns a global state. For the link-specific states in a
|
||||
* redundant bus topology, use the ecrt_master_link_state() method.
|
||||
*/
|
||||
void ecrt_master_state(
|
||||
EC_PUBLIC_API void ecrt_master_state(
|
||||
const ec_master_t *master, /**< EtherCAT master. */
|
||||
ec_master_state_t *state /**< Structure to store the information. */
|
||||
);
|
||||
|
|
@ -1009,7 +1021,7 @@ void ecrt_master_state(
|
|||
*
|
||||
* \return Zero on success, otherwise negative error code.
|
||||
*/
|
||||
int ecrt_master_link_state(
|
||||
EC_PUBLIC_API int ecrt_master_link_state(
|
||||
const ec_master_t *master, /**< EtherCAT master. */
|
||||
unsigned int dev_idx, /**< Index of the device (0 = main device, 1 =
|
||||
first backup device, ...). */
|
||||
|
|
@ -1037,7 +1049,7 @@ int ecrt_master_link_state(
|
|||
* epoch time can be done with the EC_TIMEVAL2NANO() macro, but is not
|
||||
* necessary, since the absolute value is not of any interest.
|
||||
*/
|
||||
void ecrt_master_application_time(
|
||||
EC_PUBLIC_API void ecrt_master_application_time(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint64_t app_time /**< Application time. */
|
||||
);
|
||||
|
|
@ -1047,7 +1059,7 @@ void ecrt_master_application_time(
|
|||
* The reference clock will by synchronized to the application time provided
|
||||
* by the last call off ecrt_master_application_time().
|
||||
*/
|
||||
void ecrt_master_sync_reference_clock(
|
||||
EC_PUBLIC_API void ecrt_master_sync_reference_clock(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -1056,7 +1068,7 @@ void ecrt_master_sync_reference_clock(
|
|||
* The reference clock will by synchronized to the time passed in the
|
||||
* sync_time parameter.
|
||||
*/
|
||||
void ecrt_master_sync_reference_clock_to(
|
||||
EC_PUBLIC_API void ecrt_master_sync_reference_clock_to(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint64_t sync_time /**< Sync reference clock to this time. */
|
||||
);
|
||||
|
|
@ -1065,7 +1077,7 @@ void ecrt_master_sync_reference_clock_to(
|
|||
*
|
||||
* All slave clocks synchronized to the reference clock.
|
||||
*/
|
||||
void ecrt_master_sync_slave_clocks(
|
||||
EC_PUBLIC_API void ecrt_master_sync_slave_clocks(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -1085,7 +1097,7 @@ void ecrt_master_sync_slave_clocks(
|
|||
* \retval -ENXIO No reference clock found.
|
||||
* \retval -EIO Slave synchronization datagram was not received.
|
||||
*/
|
||||
int ecrt_master_reference_clock_time(
|
||||
EC_PUBLIC_API int ecrt_master_reference_clock_time(
|
||||
ec_master_t *master, /**< EtherCAT master. */
|
||||
uint32_t *time /**< Pointer to store the queried system time. */
|
||||
);
|
||||
|
|
@ -1096,7 +1108,7 @@ int ecrt_master_reference_clock_time(
|
|||
* 0x092c) to get an upper estimation of the DC synchrony. The result can be
|
||||
* checked with the ecrt_master_sync_monitor_process() method.
|
||||
*/
|
||||
void ecrt_master_sync_monitor_queue(
|
||||
EC_PUBLIC_API void ecrt_master_sync_monitor_queue(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -1108,7 +1120,7 @@ void ecrt_master_sync_monitor_queue(
|
|||
*
|
||||
* \return Upper estimation of the maximum time difference in ns.
|
||||
*/
|
||||
uint32_t ecrt_master_sync_monitor_process(
|
||||
EC_PUBLIC_API uint32_t ecrt_master_sync_monitor_process(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -1119,7 +1131,7 @@ uint32_t ecrt_master_sync_monitor_process(
|
|||
* done by the master. But with special slaves, that can be reconfigured by
|
||||
* the vendor during runtime, it can be useful.
|
||||
*/
|
||||
void ecrt_master_reset(
|
||||
EC_PUBLIC_API void ecrt_master_reset(
|
||||
ec_master_t *master /**< EtherCAT master. */
|
||||
);
|
||||
|
||||
|
|
@ -1137,7 +1149,7 @@ void ecrt_master_reset(
|
|||
*
|
||||
* \return zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_slave_config_sync_manager(
|
||||
EC_PUBLIC_API int ecrt_slave_config_sync_manager(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint8_t sync_index, /**< Sync manager index. Must be less
|
||||
than #EC_MAX_SYNC_MANAGERS. */
|
||||
|
|
@ -1150,7 +1162,7 @@ int ecrt_slave_config_sync_manager(
|
|||
* This method has to be called in non-realtime context before
|
||||
* ecrt_master_activate().
|
||||
*/
|
||||
void ecrt_slave_config_watchdog(
|
||||
EC_PUBLIC_API void ecrt_slave_config_watchdog(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t watchdog_divider, /**< Number of 40 ns intervals (register
|
||||
0x0400). Used as a base unit for all
|
||||
|
|
@ -1171,7 +1183,7 @@ void ecrt_slave_config_watchdog(
|
|||
* \see ecrt_slave_config_pdos()
|
||||
* \return zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_slave_config_pdo_assign_add(
|
||||
EC_PUBLIC_API int ecrt_slave_config_pdo_assign_add(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint8_t sync_index, /**< Sync manager index. Must be less
|
||||
than #EC_MAX_SYNC_MANAGERS. */
|
||||
|
|
@ -1189,7 +1201,7 @@ int ecrt_slave_config_pdo_assign_add(
|
|||
*
|
||||
* \see ecrt_slave_config_pdos()
|
||||
*/
|
||||
void ecrt_slave_config_pdo_assign_clear(
|
||||
EC_PUBLIC_API void ecrt_slave_config_pdo_assign_clear(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint8_t sync_index /**< Sync manager index. Must be less
|
||||
than #EC_MAX_SYNC_MANAGERS. */
|
||||
|
|
@ -1203,7 +1215,7 @@ void ecrt_slave_config_pdo_assign_clear(
|
|||
* \see ecrt_slave_config_pdos()
|
||||
* \return zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_slave_config_pdo_mapping_add(
|
||||
EC_PUBLIC_API int ecrt_slave_config_pdo_mapping_add(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t pdo_index, /**< Index of the PDO. */
|
||||
uint16_t entry_index, /**< Index of the PDO entry to add to the PDO's
|
||||
|
|
@ -1223,7 +1235,7 @@ int ecrt_slave_config_pdo_mapping_add(
|
|||
*
|
||||
* \see ecrt_slave_config_pdos()
|
||||
*/
|
||||
void ecrt_slave_config_pdo_mapping_clear(
|
||||
EC_PUBLIC_API void ecrt_slave_config_pdo_mapping_clear(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t pdo_index /**< Index of the PDO. */
|
||||
);
|
||||
|
|
@ -1299,7 +1311,7 @@ void ecrt_slave_config_pdo_mapping_clear(
|
|||
*
|
||||
* \return zero on success, else non-zero
|
||||
*/
|
||||
int ecrt_slave_config_pdos(
|
||||
EC_PUBLIC_API int ecrt_slave_config_pdos(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
unsigned int n_syncs, /**< Number of sync manager configurations in
|
||||
\a syncs. */
|
||||
|
|
@ -1325,7 +1337,7 @@ int ecrt_slave_config_pdos(
|
|||
* \retval >=0 Success: Offset of the PDO entry's process data.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_reg_pdo_entry(
|
||||
EC_PUBLIC_API int ecrt_slave_config_reg_pdo_entry(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t entry_index, /**< Index of the PDO entry to register. */
|
||||
uint8_t entry_subindex, /**< Subindex of the PDO entry to register. */
|
||||
|
|
@ -1347,7 +1359,7 @@ int ecrt_slave_config_reg_pdo_entry(
|
|||
* \retval >=0 Success: Offset of the PDO entry's process data.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_reg_pdo_entry_pos(
|
||||
EC_PUBLIC_API int ecrt_slave_config_reg_pdo_entry_pos(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint8_t sync_index, /**< Sync manager index. */
|
||||
unsigned int pdo_pos, /**< Position of the PDO inside the SM. */
|
||||
|
|
@ -1371,7 +1383,7 @@ int ecrt_slave_config_reg_pdo_entry_pos(
|
|||
*
|
||||
* \attention The \a sync1_shift time is ignored.
|
||||
*/
|
||||
void ecrt_slave_config_dc(
|
||||
EC_PUBLIC_API void ecrt_slave_config_dc(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t assign_activate, /**< AssignActivate word. */
|
||||
uint32_t sync0_cycle, /**< SYNC0 cycle time [ns]. */
|
||||
|
|
@ -1405,7 +1417,7 @@ void ecrt_slave_config_dc(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_sdo(
|
||||
EC_PUBLIC_API int ecrt_slave_config_sdo(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t index, /**< Index of the SDO to configure. */
|
||||
uint8_t subindex, /**< Subindex of the SDO to configure. */
|
||||
|
|
@ -1423,7 +1435,7 @@ int ecrt_slave_config_sdo(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_sdo8(
|
||||
EC_PUBLIC_API int ecrt_slave_config_sdo8(
|
||||
ec_slave_config_t *sc, /**< Slave configuration */
|
||||
uint16_t sdo_index, /**< Index of the SDO to configure. */
|
||||
uint8_t sdo_subindex, /**< Subindex of the SDO to configure. */
|
||||
|
|
@ -1440,7 +1452,7 @@ int ecrt_slave_config_sdo8(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_sdo16(
|
||||
EC_PUBLIC_API int ecrt_slave_config_sdo16(
|
||||
ec_slave_config_t *sc, /**< Slave configuration */
|
||||
uint16_t sdo_index, /**< Index of the SDO to configure. */
|
||||
uint8_t sdo_subindex, /**< Subindex of the SDO to configure. */
|
||||
|
|
@ -1457,7 +1469,7 @@ int ecrt_slave_config_sdo16(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_sdo32(
|
||||
EC_PUBLIC_API int ecrt_slave_config_sdo32(
|
||||
ec_slave_config_t *sc, /**< Slave configuration */
|
||||
uint16_t sdo_index, /**< Index of the SDO to configure. */
|
||||
uint8_t sdo_subindex, /**< Subindex of the SDO to configure. */
|
||||
|
|
@ -1477,7 +1489,7 @@ int ecrt_slave_config_sdo32(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_complete_sdo(
|
||||
EC_PUBLIC_API int ecrt_slave_config_complete_sdo(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t index, /**< Index of the SDO to configure. */
|
||||
const uint8_t *data, /**< Pointer to the data. */
|
||||
|
|
@ -1494,7 +1506,7 @@ int ecrt_slave_config_complete_sdo(
|
|||
*
|
||||
* \return 0 on success, or negative error code.
|
||||
*/
|
||||
int ecrt_slave_config_emerg_size(
|
||||
EC_PUBLIC_API int ecrt_slave_config_emerg_size(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
size_t elements /**< Number of records of the CoE emergency ring. */
|
||||
);
|
||||
|
|
@ -1510,7 +1522,7 @@ int ecrt_slave_config_emerg_size(
|
|||
* \return 0 on success (record popped), or negative error code (i. e.
|
||||
* -ENOENT, if ring is empty).
|
||||
*/
|
||||
int ecrt_slave_config_emerg_pop(
|
||||
EC_PUBLIC_API int ecrt_slave_config_emerg_pop(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint8_t *target /**< Pointer to target memory (at least
|
||||
EC_COE_EMERGENCY_MSG_SIZE bytes). */
|
||||
|
|
@ -1520,7 +1532,7 @@ int ecrt_slave_config_emerg_pop(
|
|||
*
|
||||
* \return 0 on success, or negative error code.
|
||||
*/
|
||||
int ecrt_slave_config_emerg_clear(
|
||||
EC_PUBLIC_API int ecrt_slave_config_emerg_clear(
|
||||
ec_slave_config_t *sc /**< Slave configuration. */
|
||||
);
|
||||
|
||||
|
|
@ -1532,7 +1544,7 @@ int ecrt_slave_config_emerg_clear(
|
|||
*
|
||||
* \return Number of overruns since last clear, or negative error code.
|
||||
*/
|
||||
int ecrt_slave_config_emerg_overruns(
|
||||
EC_PUBLIC_API int ecrt_slave_config_emerg_overruns(
|
||||
ec_slave_config_t *sc /**< Slave configuration. */
|
||||
);
|
||||
|
||||
|
|
@ -1546,7 +1558,7 @@ int ecrt_slave_config_emerg_overruns(
|
|||
*
|
||||
* \return New SDO request, or NULL on error.
|
||||
*/
|
||||
ec_sdo_request_t *ecrt_slave_config_create_sdo_request(
|
||||
EC_PUBLIC_API ec_sdo_request_t *ecrt_slave_config_create_sdo_request(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint16_t index, /**< SDO index. */
|
||||
uint8_t subindex, /**< SDO subindex. */
|
||||
|
|
@ -1568,7 +1580,7 @@ ec_sdo_request_t *ecrt_slave_config_create_sdo_request(
|
|||
*
|
||||
* \return New VoE handler, or NULL on error.
|
||||
*/
|
||||
ec_voe_handler_t *ecrt_slave_config_create_voe_handler(
|
||||
EC_PUBLIC_API ec_voe_handler_t *ecrt_slave_config_create_voe_handler(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
size_t size /**< Data size to reserve. */
|
||||
);
|
||||
|
|
@ -1587,7 +1599,7 @@ ec_voe_handler_t *ecrt_slave_config_create_voe_handler(
|
|||
*
|
||||
* \return New register request, or NULL on error.
|
||||
*/
|
||||
ec_reg_request_t *ecrt_slave_config_create_reg_request(
|
||||
EC_PUBLIC_API ec_reg_request_t *ecrt_slave_config_create_reg_request(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
size_t size /**< Data size to reserve. */
|
||||
);
|
||||
|
|
@ -1601,7 +1613,7 @@ ec_reg_request_t *ecrt_slave_config_create_reg_request(
|
|||
* \attention If the state of process data exchange shall be monitored in
|
||||
* realtime, ecrt_domain_state() should be used.
|
||||
*/
|
||||
void ecrt_slave_config_state(
|
||||
EC_PUBLIC_API void ecrt_slave_config_state(
|
||||
const ec_slave_config_t *sc, /**< Slave configuration */
|
||||
ec_slave_config_state_t *state /**< State object to write to. */
|
||||
);
|
||||
|
|
@ -1628,7 +1640,7 @@ void ecrt_slave_config_state(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_idn(
|
||||
EC_PUBLIC_API int ecrt_slave_config_idn(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
uint8_t drive_no, /**< Drive number. */
|
||||
uint16_t idn, /**< SoE IDN. */
|
||||
|
|
@ -1660,7 +1672,7 @@ int ecrt_slave_config_idn(
|
|||
* \retval 0 Success.
|
||||
* \retval <0 Error code.
|
||||
*/
|
||||
int ecrt_slave_config_flag(
|
||||
EC_PUBLIC_API int ecrt_slave_config_flag(
|
||||
ec_slave_config_t *sc, /**< Slave configuration. */
|
||||
const char *key, /**< Key as null-terminated ascii string. */
|
||||
int32_t value /**< Value to store. */
|
||||
|
|
@ -1681,7 +1693,7 @@ int ecrt_slave_config_flag(
|
|||
* structure, or one with the \a index field set to zero!
|
||||
* \return 0 on success, else non-zero.
|
||||
*/
|
||||
int ecrt_domain_reg_pdo_entry_list(
|
||||
EC_PUBLIC_API int ecrt_domain_reg_pdo_entry_list(
|
||||
ec_domain_t *domain, /**< Domain. */
|
||||
const ec_pdo_entry_reg_t *pdo_entry_regs /**< Array of PDO
|
||||
registrations. */
|
||||
|
|
@ -1691,7 +1703,7 @@ int ecrt_domain_reg_pdo_entry_list(
|
|||
*
|
||||
* \return Size of the process data image, or a negative error code.
|
||||
*/
|
||||
size_t ecrt_domain_size(
|
||||
EC_PUBLIC_API size_t ecrt_domain_size(
|
||||
const ec_domain_t *domain /**< Domain. */
|
||||
);
|
||||
|
||||
|
|
@ -1730,7 +1742,7 @@ void ecrt_domain_external_memory(
|
|||
*
|
||||
* \return Pointer to the process data memory.
|
||||
*/
|
||||
uint8_t *ecrt_domain_data(
|
||||
EC_PUBLIC_API uint8_t *ecrt_domain_data(
|
||||
ec_domain_t *domain /**< Domain. */
|
||||
);
|
||||
|
||||
|
|
@ -1741,7 +1753,7 @@ uint8_t *ecrt_domain_data(
|
|||
* is expected to receive the domain datagrams in order to make
|
||||
* ecrt_domain_state() return the result of the last process data exchange.
|
||||
*/
|
||||
void ecrt_domain_process(
|
||||
EC_PUBLIC_API void ecrt_domain_process(
|
||||
ec_domain_t *domain /**< Domain. */
|
||||
);
|
||||
|
||||
|
|
@ -1750,7 +1762,7 @@ void ecrt_domain_process(
|
|||
* Call this function to mark the domain's datagrams for exchanging at the
|
||||
* next call of ecrt_master_send().
|
||||
*/
|
||||
void ecrt_domain_queue(
|
||||
EC_PUBLIC_API void ecrt_domain_queue(
|
||||
ec_domain_t *domain /**< Domain. */
|
||||
);
|
||||
|
||||
|
|
@ -1760,7 +1772,7 @@ void ecrt_domain_queue(
|
|||
*
|
||||
* Using this method, the process data exchange can be monitored in realtime.
|
||||
*/
|
||||
void ecrt_domain_state(
|
||||
EC_PUBLIC_API void ecrt_domain_state(
|
||||
const ec_domain_t *domain, /**< Domain. */
|
||||
ec_domain_state_t *state /**< Pointer to a state object to store the
|
||||
information. */
|
||||
|
|
@ -1776,7 +1788,7 @@ void ecrt_domain_state(
|
|||
* ecrt_sdo_request_state() returns EC_REQUEST_BUSY, this may lead to
|
||||
* unexpected results.
|
||||
*/
|
||||
void ecrt_sdo_request_index(
|
||||
EC_PUBLIC_API void ecrt_sdo_request_index(
|
||||
ec_sdo_request_t *req, /**< SDO request. */
|
||||
uint16_t index, /**< SDO index. */
|
||||
uint8_t subindex /**< SDO subindex. */
|
||||
|
|
@ -1790,7 +1802,7 @@ void ecrt_sdo_request_index(
|
|||
* The timeout is permanently stored in the request object and is valid until
|
||||
* the next call of this method.
|
||||
*/
|
||||
void ecrt_sdo_request_timeout(
|
||||
EC_PUBLIC_API void ecrt_sdo_request_timeout(
|
||||
ec_sdo_request_t *req, /**< SDO request. */
|
||||
uint32_t timeout /**< Timeout in milliseconds. Zero means no
|
||||
timeout. */
|
||||
|
|
@ -1819,7 +1831,7 @@ void ecrt_sdo_request_timeout(
|
|||
*
|
||||
* \return Pointer to the internal SDO data memory.
|
||||
*/
|
||||
uint8_t *ecrt_sdo_request_data(
|
||||
EC_PUBLIC_API uint8_t *ecrt_sdo_request_data(
|
||||
ec_sdo_request_t *req /**< SDO request. */
|
||||
);
|
||||
|
||||
|
|
@ -1831,7 +1843,7 @@ uint8_t *ecrt_sdo_request_data(
|
|||
*
|
||||
* \return SDO data size in bytes.
|
||||
*/
|
||||
size_t ecrt_sdo_request_data_size(
|
||||
EC_PUBLIC_API size_t ecrt_sdo_request_data_size(
|
||||
const ec_sdo_request_t *req /**< SDO request. */
|
||||
);
|
||||
|
||||
|
|
@ -1844,7 +1856,7 @@ ec_request_state_t ecrt_sdo_request_state(
|
|||
const ec_sdo_request_t *req /**< SDO request. */
|
||||
);
|
||||
#else
|
||||
ec_request_state_t ecrt_sdo_request_state(
|
||||
EC_PUBLIC_API ec_request_state_t ecrt_sdo_request_state(
|
||||
ec_sdo_request_t *req /**< SDO request. */
|
||||
);
|
||||
#endif
|
||||
|
|
@ -1854,7 +1866,7 @@ ec_request_state_t ecrt_sdo_request_state(
|
|||
* \attention This method may not be called while ecrt_sdo_request_state()
|
||||
* returns EC_REQUEST_BUSY.
|
||||
*/
|
||||
void ecrt_sdo_request_write(
|
||||
EC_PUBLIC_API void ecrt_sdo_request_write(
|
||||
ec_sdo_request_t *req /**< SDO request. */
|
||||
);
|
||||
|
||||
|
|
@ -1867,7 +1879,7 @@ void ecrt_sdo_request_write(
|
|||
* ecrt_sdo_request_data() must be considered as invalid while
|
||||
* ecrt_sdo_request_state() returns EC_REQUEST_BUSY.
|
||||
*/
|
||||
void ecrt_sdo_request_read(
|
||||
EC_PUBLIC_API void ecrt_sdo_request_read(
|
||||
ec_sdo_request_t *req /**< SDO request. */
|
||||
);
|
||||
|
||||
|
|
@ -1882,7 +1894,7 @@ void ecrt_sdo_request_read(
|
|||
* are valid and will be used for future send operations until the next call
|
||||
* of this method.
|
||||
*/
|
||||
void ecrt_voe_handler_send_header(
|
||||
EC_PUBLIC_API void ecrt_voe_handler_send_header(
|
||||
ec_voe_handler_t *voe, /**< VoE handler. */
|
||||
uint32_t vendor_id, /**< Vendor ID. */
|
||||
uint16_t vendor_type /**< Vendor-specific type. */
|
||||
|
|
@ -1896,7 +1908,7 @@ void ecrt_voe_handler_send_header(
|
|||
* The header information is stored at the memory given by the pointer
|
||||
* parameters.
|
||||
*/
|
||||
void ecrt_voe_handler_received_header(
|
||||
EC_PUBLIC_API void ecrt_voe_handler_received_header(
|
||||
const ec_voe_handler_t *voe, /**< VoE handler. */
|
||||
uint32_t *vendor_id, /**< Vendor ID. */
|
||||
uint16_t *vendor_type /**< Vendor-specific type. */
|
||||
|
|
@ -1922,7 +1934,7 @@ void ecrt_voe_handler_received_header(
|
|||
*
|
||||
* \return Pointer to the internal memory.
|
||||
*/
|
||||
uint8_t *ecrt_voe_handler_data(
|
||||
EC_PUBLIC_API uint8_t *ecrt_voe_handler_data(
|
||||
ec_voe_handler_t *voe /**< VoE handler. */
|
||||
);
|
||||
|
||||
|
|
@ -1938,7 +1950,7 @@ uint8_t *ecrt_voe_handler_data(
|
|||
*
|
||||
* \return Data size in bytes.
|
||||
*/
|
||||
size_t ecrt_voe_handler_data_size(
|
||||
EC_PUBLIC_API size_t ecrt_voe_handler_data_size(
|
||||
const ec_voe_handler_t *voe /**< VoE handler. */
|
||||
);
|
||||
|
||||
|
|
@ -1948,7 +1960,7 @@ size_t ecrt_voe_handler_data_size(
|
|||
* must be called in every bus cycle as long as it returns EC_REQUEST_BUSY. No
|
||||
* other operation may be started while the handler is busy.
|
||||
*/
|
||||
void ecrt_voe_handler_write(
|
||||
EC_PUBLIC_API void ecrt_voe_handler_write(
|
||||
ec_voe_handler_t *voe, /**< VoE handler. */
|
||||
size_t size /**< Number of bytes to write (without the VoE header). */
|
||||
);
|
||||
|
|
@ -1967,7 +1979,7 @@ void ecrt_voe_handler_write(
|
|||
* ecrt_voe_handler_data_size(), while the VoE header of the received data
|
||||
* can be retrieved with ecrt_voe_handler_received_header().
|
||||
*/
|
||||
void ecrt_voe_handler_read(
|
||||
EC_PUBLIC_API void ecrt_voe_handler_read(
|
||||
ec_voe_handler_t *voe /**< VoE handler. */
|
||||
);
|
||||
|
||||
|
|
@ -1986,7 +1998,7 @@ void ecrt_voe_handler_read(
|
|||
* ecrt_voe_handler_data_size(), while the VoE header of the received data
|
||||
* can be retrieved with ecrt_voe_handler_received_header().
|
||||
*/
|
||||
void ecrt_voe_handler_read_nosync(
|
||||
EC_PUBLIC_API void ecrt_voe_handler_read_nosync(
|
||||
ec_voe_handler_t *voe /**< VoE handler. */
|
||||
);
|
||||
|
||||
|
|
@ -1997,7 +2009,7 @@ void ecrt_voe_handler_read_nosync(
|
|||
*
|
||||
* \return Handler state.
|
||||
*/
|
||||
ec_request_state_t ecrt_voe_handler_execute(
|
||||
EC_PUBLIC_API ec_request_state_t ecrt_voe_handler_execute(
|
||||
ec_voe_handler_t *voe /**< VoE handler. */
|
||||
);
|
||||
|
||||
|
|
@ -2024,7 +2036,7 @@ ec_request_state_t ecrt_voe_handler_execute(
|
|||
*
|
||||
* \return Pointer to the internal memory.
|
||||
*/
|
||||
uint8_t *ecrt_reg_request_data(
|
||||
EC_PUBLIC_API uint8_t *ecrt_reg_request_data(
|
||||
ec_reg_request_t *req /**< Register request. */
|
||||
);
|
||||
|
||||
|
|
@ -2037,7 +2049,7 @@ ec_request_state_t ecrt_reg_request_state(
|
|||
const ec_reg_request_t *req /**< Register request. */
|
||||
);
|
||||
#else
|
||||
ec_request_state_t ecrt_reg_request_state(
|
||||
EC_PUBLIC_API ec_request_state_t ecrt_reg_request_state(
|
||||
ec_reg_request_t *req /**< Register request. */
|
||||
);
|
||||
#endif
|
||||
|
|
@ -2050,7 +2062,7 @@ ec_request_state_t ecrt_reg_request_state(
|
|||
* \attention The \a size parameter is truncated to the size given at request
|
||||
* creation.
|
||||
*/
|
||||
void ecrt_reg_request_write(
|
||||
EC_PUBLIC_API void ecrt_reg_request_write(
|
||||
ec_reg_request_t *req, /**< Register request. */
|
||||
uint16_t address, /**< Register address. */
|
||||
size_t size /**< Size to write. */
|
||||
|
|
@ -2064,7 +2076,7 @@ void ecrt_reg_request_write(
|
|||
* \attention The \a size parameter is truncated to the size given at request
|
||||
* creation.
|
||||
*/
|
||||
void ecrt_reg_request_read(
|
||||
EC_PUBLIC_API void ecrt_reg_request_read(
|
||||
ec_reg_request_t *req, /**< Register request. */
|
||||
uint16_t address, /**< Register address. */
|
||||
size_t size /**< Size to write. */
|
||||
|
|
@ -2226,7 +2238,7 @@ void ecrt_reg_request_read(
|
|||
* \param data EtherCAT data pointer
|
||||
* \return EtherCAT data value
|
||||
*/
|
||||
float ecrt_read_real(const void *data);
|
||||
EC_PUBLIC_API float ecrt_read_real(const void *data);
|
||||
|
||||
/** Read a 32-bit floating-point value from EtherCAT data.
|
||||
*
|
||||
|
|
@ -2240,7 +2252,7 @@ float ecrt_read_real(const void *data);
|
|||
* \param data EtherCAT data pointer
|
||||
* \return EtherCAT data value
|
||||
*/
|
||||
double ecrt_read_lreal(const void *data);
|
||||
EC_PUBLIC_API double ecrt_read_lreal(const void *data);
|
||||
|
||||
/** Read a 64-bit floating-point value from EtherCAT data.
|
||||
*
|
||||
|
|
@ -2334,7 +2346,7 @@ double ecrt_read_lreal(const void *data);
|
|||
* \param data EtherCAT data pointer
|
||||
* \param value new value
|
||||
*/
|
||||
void ecrt_write_real(void *data, float value);
|
||||
EC_PUBLIC_API void ecrt_write_real(void *data, float value);
|
||||
|
||||
/** Write a 32-bit floating-point value to EtherCAT data.
|
||||
*
|
||||
|
|
@ -2348,7 +2360,7 @@ void ecrt_write_real(void *data, float value);
|
|||
* \param data EtherCAT data pointer
|
||||
* \param value new value
|
||||
*/
|
||||
void ecrt_write_lreal(void *data, double value);
|
||||
EC_PUBLIC_API void ecrt_write_lreal(void *data, double value);
|
||||
|
||||
/** Write a 64-bit floating-point value to EtherCAT data.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@ noinst_HEADERS = \
|
|||
slave_config.h \
|
||||
voe_handler.h
|
||||
|
||||
libethercat_la_CFLAGS = -fno-strict-aliasing -Wall -I$(top_srcdir)
|
||||
libethercat_la_CFLAGS = -fno-strict-aliasing -Wall -I$(top_srcdir) \
|
||||
-Dethercat_EXPORTS \
|
||||
-fvisibility=hidden
|
||||
|
||||
#
|
||||
# http://www.gnu.org/software/libtool/manual/html_node/ ...
|
||||
|
|
@ -65,7 +67,8 @@ libethercat_la_CFLAGS = -fno-strict-aliasing -Wall -I$(top_srcdir)
|
|||
# ecrt_master_sync_reference_clock_to() added.
|
||||
# 2:0:1
|
||||
#
|
||||
libethercat_la_LDFLAGS = -version-info 2:0:1
|
||||
libethercat_la_LDFLAGS = -version-info 2:0:1 \
|
||||
-fvisibility=hidden
|
||||
|
||||
pkgconfig_DATA = libethercat.pc
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue