Program Listing for File device.h

Return to documentation for file (include/libcaer/devices/device.h)

#ifndef LIBCAER_DEVICES_DEVICE_H_
#define LIBCAER_DEVICES_DEVICE_H_

#include "../libcaer.h"

#include "../events/packetContainer.h"

#ifdef __cplusplus
extern "C" {
#endif

#define CAER_SUPPORTED_DEVICES_NUMBER 10

typedef struct caer_device_handle *caerDeviceHandle;

#define CAER_HOST_CONFIG_DATAEXCHANGE -2
#define CAER_HOST_CONFIG_PACKETS -3
#define CAER_HOST_CONFIG_LOG -4

#define CAER_HOST_CONFIG_DATAEXCHANGE_BUFFER_SIZE 0
#define CAER_HOST_CONFIG_DATAEXCHANGE_BLOCKING 1
#define CAER_HOST_CONFIG_DATAEXCHANGE_START_PRODUCERS 2
#define CAER_HOST_CONFIG_DATAEXCHANGE_STOP_PRODUCERS 3

#define CAER_HOST_CONFIG_PACKETS_MAX_CONTAINER_PACKET_SIZE 0
#define CAER_HOST_CONFIG_PACKETS_MAX_CONTAINER_INTERVAL 1

#define CAER_HOST_CONFIG_LOG_LEVEL 0

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceClose(caerDeviceHandle *handle);

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceSendDefaultConfig(caerDeviceHandle handle);

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceConfigSet(
    caerDeviceHandle handle, int8_t modAddr, uint8_t paramAddr, uint32_t param);

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceConfigGet(
    caerDeviceHandle handle, int8_t modAddr, uint8_t paramAddr, uint32_t *param);

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceConfigGet64(
    caerDeviceHandle handle, int8_t modAddr, uint8_t paramAddr, uint64_t *param);

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceDataStart(caerDeviceHandle handle, void (*dataNotifyIncrease)(void *ptr),
    void (*dataNotifyDecrease)(void *ptr), void *dataNotifyUserPtr, void (*dataShutdownNotify)(void *ptr),
    void *dataShutdownUserPtr);

LIBRARY_PUBLIC_VISIBILITY bool caerDeviceDataStop(caerDeviceHandle handle);

LIBRARY_PUBLIC_VISIBILITY caerEventPacketContainer caerDeviceDataGet(caerDeviceHandle handle);

#ifdef __cplusplus
}
#endif

#endif /* LIBCAER_DEVICES_DEVICE_H_ */