Lucon SDK 1.0.7
Loading...
Searching...
No Matches
lucon_device.h
Go to the documentation of this file.
1
4
5#ifndef LUCON_DEVICE_H
6#define LUCON_DEVICE_H
7
8#include <stdint.h>
9#include <stdbool.h>
10#include "lucon_base.h"
11
15
26
38
47
56extern LUCON_EXPORTS LuconResult LUCON_DeviceIsConnected(LuconHandle device, int32_t forceCheck, int32_t* const isConnected);
57
70
85
97extern LUCON_EXPORTS LuconResult LUCON_DeviceRestart(LuconHandle device, int32_t restartChannels);
98
112
124extern LUCON_EXPORTS LuconResult LUCON_DeviceGetSerialNumber(LuconHandle device, char* const strbuf, const size_t buf_len);
125
137extern LUCON_EXPORTS LuconResult LUCON_DeviceGetMacAddress(LuconHandle device, char* const strbuf, const size_t buf_len);
138
152extern LUCON_EXPORTS LuconResult LUCON_DeviceGetIpAddress(LuconHandle device, char* const strbuf, const size_t buf_len);
153
165extern LUCON_EXPORTS LuconResult LUCON_DeviceSetIpAddress(LuconHandle device, const char* const address);
166
178extern LUCON_EXPORTS LuconResult LUCON_DeviceGetSubnetMask(LuconHandle device, char* const strbuf, const size_t buf_len);
179
187extern LUCON_EXPORTS LuconResult LUCON_DeviceSetSubnetMask(LuconHandle device, const char* const subnet);
188
200extern LUCON_EXPORTS LuconResult LUCON_DeviceGetFirmwareVersion(LuconHandle device, char* const strbuf, const size_t buf_len);
201
213extern LUCON_EXPORTS LuconResult LUCON_DeviceGetChannelNumbers(LuconHandle device, uint8_t* const nbrs, const size_t buf_len, size_t* numChannels);
214
228extern LUCON_EXPORTS LuconResult LUCON_DeviceGetChannel(LuconHandle device, const uint32_t channelNumber, LuconHandle* ptrChannelHandle);
229
243extern LUCON_EXPORTS LuconResult LUCON_DeviceSetChannelsToContinuousMode(LuconHandle device, const uint8_t channelNumbers[], const struct LuconContinuousModeParameters params[], size_t numChannels);
244
257extern LUCON_EXPORTS LuconResult LUCON_DeviceGetInfo(LuconHandle device, char* const result, const size_t buf_len);
258 // end of addtrogroupg GroupDevice
260
261#endif
LuconResult LUCON_DeviceIsConnected(LuconHandle device, int32_t forceCheck, int32_t *const isConnected)
Check connectivity of the device with the help of a handshake.
LuconResult LUCON_DeviceSetRestartedCallback(LuconHandle device, LuconVoidCallback callback)
Set a callback function to be called when the host receives a restart hint from the device.
LuconResult LUCON_DeviceSetIpAddress(LuconHandle device, const char *const address)
Set the IPv4 address of the Lucon.
LuconResult LUCON_DeviceSetConnectedChangedCallback(LuconHandle device, LuconVoidCallback callback)
Set a callback function to be called when the connection status of the device changes.
LuconResult LUCON_DeviceDisconnect(LuconHandle device)
Stops communication and closes the connection to the device.
LuconResult LUCON_DeviceGetSerialNumber(LuconHandle device, char *const strbuf, const size_t buf_len)
Read the serial number from the communication module as a string.
LuconResult LUCON_DeviceGetIpAddress(LuconHandle device, char *const strbuf, const size_t buf_len)
Read the IP address setting from the communication module as a string.
LuconResult LUCON_DeviceConnect(LuconHandle device)
Start communicating with the device.
LuconResult LUCON_DeviceGetFirmwareVersion(LuconHandle device, char *const strbuf, const size_t buf_len)
Read the current firmware version from the device.
LuconHandle LUCON_NewDevice(LuconHandle conn)
creates a LuconHandle referring to a Lucon device
LuconResult LUCON_DeviceGetChannelNumbers(LuconHandle device, uint8_t *const nbrs, const size_t buf_len, size_t *numChannels)
Read the channel numbers of the available ("online") channels from the device.
LuconResult LUCON_DeviceGetChannel(LuconHandle device, const uint32_t channelNumber, LuconHandle *ptrChannelHandle)
Create a handle to access the channel with the given channelNumber.
LuconResult LUCON_DeviceSetChannelsToContinuousMode(LuconHandle device, const uint8_t channelNumbers[], const struct LuconContinuousModeParameters params[], size_t numChannels)
Set the desired continuous output currents of multiple channels in one command.
LuconResult LUCON_DeviceRestart(LuconHandle device, int32_t restartChannels)
Triggers a restart of the Lucon. Either only the communication module can be restarted or all modules...
LuconResult LUCON_DeviceSetSubnetMask(LuconHandle device, const char *const subnet)
Set the subnet mask of the device.
LuconResult LUCON_DeviceGetSubnetMask(LuconHandle device, char *const strbuf, const size_t buf_len)
Read the IPv4 subnet mask from the device.
LuconResult LUCON_DeviceGetMacAddress(LuconHandle device, char *const strbuf, const size_t buf_len)
Read the MAC address from the communication module as a string.
LuconResult LUCON_DeviceSavePermanently(LuconHandle device, int32_t restart)
Persistently save the current parameters of the communication module in its EEPROM.
LuconResult LUCON_DeviceGetInfo(LuconHandle device, char *const result, const size_t buf_len)
Compose a descriptive string by reading key parameters from the device.
struct LuconObject * LuconHandle
LuconHandle A handle to an object within the Lucon SDK.
Definition lucon_base.h:110
basic type definitions
void(* LuconVoidCallback)(const LuconHandle caller)
Signature of a callback function to receive event notifications without any argument.
Definition lucon_base.h:119
#define LUCON_EXPORTS
Marks symbols exported by the library.
Definition lucon_base.h:14
LuconResult
Inidcates the result of API calls.
Definition lucon_base.h:23
Parameters for output control of a channel in continuous mode.
Definition lucon_base.h:141