
#ifndef ETHERCAT_MASTER_EVENTS_H
#define ETHERCAT_MASTER_EVENTS_H

#include "../ethercat_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#ifndef DYNAMIC_LOAD

void     SetLogCallback(log_callback_t callback);
void     SetCrashCallback(crash_callback_t callback);

void     RegisterProcessDataCyclicCallbackSync(pdo_cyclic_callback_t callback);
void     RegisterSlaveStateChangeCallbackSync(state_change_callback_t callback);
void     RegisterSlaveStateChangeCallbackAsync(state_change_callback_t callback);
void     RegisterEmergencyEventCallback(emergency_callback_t callback);
void     RegisterSlaveDiscoveryCallbackSync(discovery_callback_t callback);
void     RegisterSlaveDiscoveryCallbackAsync(discovery_callback_t callback);
void     RegisterPDOFrameLossCallback(frame_loss_callback_t callback);
void     RegisterRedundancyModeChangedCallback(redundancy_changed_callback_t callback);
void     RegisterSlavePreOpReconfigCallback(preop_reconfig_callback_t callback);

void     SetDCSyncLostCallback(dc_sync_lost_callback_t callback);

void     RegisterSlaveIdentityMismatchCallback(identity_mismatch_callback_t callback);

void     RegisterSlavePortLinkChangedCallback(port_link_changed_callback_t callback);

void     ClearAllEvents(uint16_t master_index);

#endif

#ifdef __cplusplus
}
#endif

#endif
