
#ifndef ETHERCAT_STATICS_NETWORK_H
#define ETHERCAT_STATICS_NETWORK_H

#include "../ethercat_types.h"
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef DYNAMIC_LOAD

int      GetNetworkInfo(BOOL is_redundant, BOOL need_slaves_num);
void*    GetNetworksPointer(void);
int      QuickSlaveCount(const char* adapter_name);

int      QuickFindRedundantPairBatch(const char** adapter_names, int adapter_count,
                                      int* primary_idx, int* secondary_idx,
                                      int* out_ring_count, int* out_total_count);
int      ReadSlaveInfo(const char* adapter_name);
int      GetScannedSlaveCount(void);
BOOL     GetScannedSlaveInfo(int index, uint32_t* vendor_id, uint32_t* product_code,
                             uint32_t* revision, uint32_t* serial,
                             char* name, int name_size,
                             uint16_t* config_addr, uint16_t* alias_addr,
                             uint16_t* parent, uint8_t* topology, uint8_t* activeports,
                             uint8_t* entryport, uint8_t* parentport, uint8_t* ptype);
int      GetRingSlaveCount(void);

#endif

#ifdef __cplusplus
}
#endif

#endif
