UniSet 2.44.3
Пространство имен uniset

Пространства имен

namespace  ModbusTCPCore

Классы

class  Calibration
class  DigitalFilter
struct  IOBase
class  PID
class  SMInterface
struct  ACL
struct  ACLInfo
class  AccessConfig
class  AccessMask
class  EvWatcher
class  CommonEventLoop
 The CommonEventLoop class Реализация механизма "один eventloop, много подписчиков" (libev). Создаётся один CommonEventLoop который обслуживает множество EvWatcher-ов. Каждый класс который хочет подключиться к основному loop, должен наследоваться от класса Watcher и при необходимости переопределить функции evprepare и evfinish. EvWatcher добавляется(запускается) evrun(..) и останавливается функцией evstop(..). При этом фактически eventloop запускается при первом вызове evrun(), а останавливается при отключении последнего EvWatcher. Подробнее...
class  ComPort
class  ComPort485F
class  Configuration
class  DBInterface
class  DBNetInterface
class  DBResult
class  DBRowIterator
struct  DBInterfaceDeleter
class  DBServer
class  DelayTimer
class  EventLoopServer
 The EventLoopServer class Реализация общей части всех процессов использующих libev. Содержит свой (динамический) eventloop;. Подробнее...
class  Exception
class  OutOfRange
class  ORepFailed
class  SystemError
class  CommFailed
class  TimeOut
class  ResolveNameError
class  NSResolveError
class  ObjectNameAlready
class  IOBadParam
class  AccessDenied
class  InvalidObjectName
class  NameNotFound
class  HourGlass
class  IOConfig
class  IOConfig_XML
class  IOController
class  IONotifyController
class  IORFile
class  LogAgregator
class  LogReader
class  LogServer
class  LogSession
class  LT_Object
class  Message
class  VoidMessage
class  SensorMessage
class  SystemMessage
class  TimerMessage
class  ConfirmMessage
class  TextMessage
class  ModbusClient
class  ModbusRTUMaster
class  ModbusRTUSlave
class  ModbusRTUSlaveSlot
class  ModbusServer
class  ModbusServerSlot
class  ModbusTCPMaster
class  ModbusTCPServer
class  ModbusTCPServerSlot
class  ModbusTCPSession
 The ModbusTCPSession class Класс рассчитан на совместную работу с ModbusTCPServer, т.к. построен на основе libev, и главный цикл (default_loop) находиться там. Подробнее...
class  MQAtomic
class  MQMutex
class  uniset_rwmutex
class  uniset_rwmutex_wrlock
class  uniset_rwmutex_rlock
class  ObjectIndex
class  ObjectIndex_Array
class  ObjectIndex_hashXML
class  ObjectIndex_idXML
class  ObjectIndex_XML
class  ObjectRepository
class  OmniThreadCreator
class  PassiveObject
class  UniSetTimer
 Базовый интерфейс пассивных таймеров Подробнее...
class  PassiveTimer
 Пассивный таймер Подробнее...
class  PassiveCondTimer
 Пассивный таймер с режимом засыпания (ожидания). Подробнее...
class  ProxyManager
class  Pulse
class  RunLock
class  SMonitor
class  SViewer
class  TCPCheck
class  ThreadCreator
class  Trigger
class  TriggerAND
class  TriggerOR
class  TriggerOUT
class  UDPSocketU
class  UDPReceiveU
class  MulticastSocketU
class  UInterface
class  UniSetActivator
class  UniSetManager
class  UniSetObject
class  IDList
struct  ObjectInfo
struct  ParamSInfo
class  ios_fmt_restorer
class  UniXML_iterator
class  UniXML
class  USingleProcess
class  USocket
class  UTCPSocket
class  UTCPStream
class  VMonitor
class  WDTInterface
struct  TransportMessage
struct  NodeInfo
struct  SimpleInfo
struct  ConsumerInfo
struct  ProducerInfo
struct  Timespec
class  BackendClickHouse
class  ClickHouseInterface
class  ClickHouseTagsConfig
class  BackendOpenTSDB
class  DBServer_MySQL
class  MySQLInterface
class  DBServer_PostgreSQL
 The DBServer_PostgreSQL class Реализация работы с PostgreSQL. Т.к. основная работа сервера - это частая запись данных, то сделана следующая оптимизация: Создаётся insert-буфер настраиваемого размера (ibufMaxSize). Как только буфер заполняется, он пишется в БД одним "оптимизированным" запросом. Помимо этого буфер скидывается, если прошло ibufSyncTimeout мсек или если пришёл запрос на UPDATE данных. Подробнее...
class  PostgreSQLInterface
class  DBServer_SQLite
class  SQLiteInterface
class  HttpResolver
class  ComediInterface
class  CardList
class  IOControl
class  FakeComediInterface
class  FakeIOControl
class  JHttpServer
struct  JSOptions
class  JSEngine
class  JSModbusClient
class  JSOPCUAClient
class  JSProxy
class  ModbusTCPServerTest
class  ConfigLoader
class  CyclicDependencyException
class  UnknownDependencyException
class  DependencyResolver
class  HealthChecker
class  LauncherHTTPHandler
class  LauncherHTTPHandlerFactory
class  LauncherHttpRegistry
class  OmniNamesManager
struct  ReadyCheck
struct  ProcessInfo
struct  ProcessGroup
class  ProcessManager
struct  ProcessTemplate
class  ProcessTemplateRegistry
class  LogDB
class  LogicException
class  Element
class  TOR
class  TAND
class  TNOT
class  TSEL_R
class  TRS
class  LProcessor
class  PassiveLProcessor
class  Schema
class  SchemaXML
class  TA2D
class  TDelay
class  MBConfig
class  MBExchange
class  MBTCPMaster
class  MBTCPMultiMaster
class  RTUExchange
class  RTUStorage
class  MBSlave
class  MQTTPublisher
class  OPCUAClient
class  OPCUAExchange
class  OPCUAServer
class  RRDServer
class  SharedMemory
class  MulticastReceiveTransport
class  MulticastSendTransport
class  UDPReceiveTransport
class  UDPSendTransport
class  UNetExchange
class  UNetReceiver
class  UNetSender
class  UNetReceiveTransport
class  UNetSendTransport
class  UniExchange
class  ExtArgvBuilder
class  UniSetUno
 UniSetUno - Combined application running multiple extensions in single process. Подробнее...
class  UWebSocketGate
class  Service

Определения типов

using PermissionsMap = std::unordered_map<uniset::ObjectId, uniset::AccessMask>
using ACLMap = std::unordered_map< std::string, std::shared_ptr<ACL> >
using ACLPtr = std::shared_ptr<ACL>
typedef std::unordered_map< uniset::ObjectId, ACLInfoACLInfoMap
typedef std::shared_ptr< DBInterfacecreate_dbinterface_t()
typedef std::shared_ptr< uniset::VoidMessageVoidMessagePtr
typedef Poco::Timespan::TimeDiff timeout_t
typedef std::shared_ptr< UniSetActivatorUniSetActivatorPtr
typedef std::list< std::shared_ptr< UniSetManager > > UniSetManagerList
typedef std::list< std::shared_ptr< UniSetObject > > ObjectsList
typedef uint64_t KeyType
typedef std::list< std::string > ListObjectName
typedef CORBA::Object_ptr ObjectPtr
typedef CORBA::Object_var ObjectVar
typedef std::list< NodeInfoListOfNode
typedef std::vector< std::pair< const std::string, const std::string > > UniXMLPropList
typedef long ObjectId
typedef long ThresholdId
typedef long TimerId
typedef string< SizeOfObjectType > ObjectType
typedef octet ByteOfMessage
typedef ByteOfMessage RawDataOfTransportMessage[SizeOfTransportMessage]
typedef sequence< SimpleInfoSimpleInfoSeq
typedef sequence< ObjectIdIDSeq

Перечисления

enum  LampCommand {
  lmpOFF = 0 , lmpON = 1 , lmpBLINK = 2 , lmpBLINK2 = 3 ,
  lmpBLINK3 = 4
}
enum class  ProcessState {
  Stopped , Starting , Running , Completed ,
  Failed , Stopping , Restarting
}
enum class  ReadyCheckType {
  None , TCP , CORBA , HTTP ,
  File
}

Функции

std::ostream & operator<< (std::ostream &os, const AccessMask &a)
std::shared_ptr< Configurationuniset_conf () noexcept
std::shared_ptr< DebugStreamulog () noexcept
std::shared_ptr< Configurationuniset_init (int argc, const char *const *argv, const std::string &xmlfile="configure.xml")
std::shared_ptr< Configurationuniset_init (int argc, const char *const *argv, std::shared_ptr< UniXML > xml)
std::string strTypeOfMessage (int type)
std::ostream & operator<< (std::ostream &os, const Message::TypeOfMessage &t)
std::ostream & operator<< (std::ostream &os, const SystemMessage::Command &c)
std::ostream & operator<< (std::ostream &os, uniset_rwmutex &m)
template<typename T, typename... _Args>
std::shared_ptr< T > make_object (const std::string &idname, const std::string &secname, _Args &&... __args)
template<typename T, typename... _Args>
std::shared_ptr< T > make_object_x (xmlNode *root, const std::string &secname, _Args &&... __args)
template<typename T, typename M, typename... _Args>
std::shared_ptr< T > make_child_object (M *m, const std::string &idname, const std::string &secname, _Args &&... __args)
template<typename T, typename M, typename... _Args>
std::shared_ptr< T > make_child_object_x (M *m, xmlNode *root, const std::string &secname, _Args &&... __args)
char checkBadSymbols (const std::string &str)
std::string BadSymbolsToStr ()
KeyType key (const uniset::ObjectId id, const uniset::ObjectId node)
KeyType key (const IOController_i::SensorInfo &si)
uint64_t hash64 (const std::string &str) noexcept
uint64_t hash64 (const char *buf, size_t sz) noexcept
uint32_t hash32 (const std::string &str) noexcept
uint32_t hash32 (const char *buf, size_t sz) noexcept
UniversalIO::IOType getIOType (const std::string &s) noexcept
std::string iotype2str (const UniversalIO::IOType &t) noexcept
std::ostream & operator<< (std::ostream &os, const UniversalIO::IOType t)
std::ostream & operator<< (std::ostream &os, const IONotifyController_i::ThresholdInfo &ti)
std::ostream & operator<< (std::ostream &os, const IOController_i::ShortIOInfo &s)
std::ostream & operator<< (std::ostream &os, const IONotifyController_i::ThresholdState &s)
int uni_atoi (const char *str) noexcept
 Преобразование строки в число (воспринимает префикс 0, как 8-ное, префикс 0x, как 16-ное, минус для отриц. чисел).
int uni_atoi (const std::string &str) noexcept
char * uni_strdup (const std::string &src)
std::string timeToString (time_t tm=time(0), const std::string &brk=":") noexcept
std::string dateToString (time_t tm=time(0), const std::string &brk="/") noexcept
struct timeval to_timeval (const std::chrono::system_clock::duration &d)
struct timespec to_timespec (const std::chrono::system_clock::duration &d)
struct timespec now_to_timespec ()
uniset::Timespec_var to_uniset_timespec (const std::chrono::system_clock::duration &d)
uniset::Timespec_var now_to_uniset_timespec ()
int64_t timespec_to_nanosec (const struct timespec &tm)
IDList explode (const std::string &str, char sep=',')
std::vector< std::string > explode_str (const std::string &str, char sep=',')
std::list< ParamSInfogetSInfoList (const std::string &s, std::shared_ptr< uniset::Configuration > conf=nullptr)
uniset::ParamSInfo parseSInfo (const std::string &s, std::shared_ptr< uniset::Configuration > conf=nullptr)
std::list< uniset::ConsumerInfogetObjectsList (const std::string &s, std::shared_ptr< uniset::Configuration > conf=nullptr)
bool is_digit (const std::string &s) noexcept
std::string replace_all (const std::string &src, const std::string &from, const std::string &to)
std::string getArgParam (const std::string &name, int _argc, const char *const *_argv, const std::string &defval="") noexcept
std::string getArg2Param (const std::string &name, int _argc, const char *const *_argv, const std::string &defval, const std::string &defval2="") noexcept
int getArgInt (const std::string &name, int _argc, const char *const *_argv, const std::string &defval="") noexcept
int getArgPInt (const std::string &name, int _argc, const char *const *_argv, const std::string &strdefval, int defval) noexcept
int findArgParam (const std::string &name, int _argc, const char *const *_argv)
std::ostream & operator<< (std::ostream &os, const IOController_i::CalibrateInfo &c)
float fcalibrate (float raw, float rawMin, float rawMax, float calMin, float calMax, bool limit=true)
long lcalibrate (long raw, long rawMin, long rawMax, long calMin, long calMax, bool limit=true)
double dcalibrate (double raw, double rawMin, double rawMax, double calMin, double calMax, bool limit=true)
long setinregion (long raw, long rawMin, long rawMax)
long setoutregion (long raw, long rawMin, long rawMax)
bool file_exist (const std::string &filename)
bool directory_exist (const std::string &path)
bool create_directory (const std::string &path, bool with_parents=true)
bool check_filter (UniXML::iterator &it, const std::string &f_prop, const std::string &f_val="") noexcept
bool check_filter_re (UniXML::iterator &it, const std::string &f_prop, const std::regex &re) noexcept
bool containsIgnoreCase (const std::string &text, const std::string &pattern) noexcept
static int32_t get_crc_16 (uint16_t crc, uint8_t *buf, size_t size)
static std::string makeSecName (const std::string &sec, const std::string &name) noexcept
static void activator_terminate (int signo)
std::ostream & operator<< (std::ostream &os, uniset::UniSetManager::OManagerCommand &cmd)
ostreamoperator<< (std::ostream &os, UniSetObject &obj)
std::ostream & operator<< (std::ostream &os, LogAgregator &la)
std::ostream & operator<< (std::ostream &os, std::shared_ptr< LogAgregator > la)
static Poco::UInt16 normalize_port (int port) noexcept
static const std::string checkArg (size_t i, const std::vector< std::string > &v)
std::ostream & operator<< (std::ostream &os, ObjectIndex_Array &oi)
std::ostream & operator<< (std::ostream &os, ObjectIndex_hashXML &oi)
std::ostream & operator<< (std::ostream &os, ObjectIndex_idXML &oi)
std::ostream & operator<< (std::ostream &os, ObjectIndex_XML &oi)
std::ostream & operator<< (std::ostream &os, VMonitor &m)
std::ostream & operator<< (std::ostream &os, const std::shared_ptr< IOControl::IOInfo > &inf)
std::ostream & operator<< (std::ostream &os, const IOControl::IOInfo &inf)
std::string to_string (ProcessState state)
std::string to_string (ReadyCheckType type)
ReadyCheckType readyCheckTypeFromString (const std::string &s)
static std::vector< pid_t > getChildPids (pid_t parentPid)
static void collectProcessTree (pid_t pid, std::vector< pid_t > &pids)
static void terminateProcessTree (pid_t pid)
static void killProcessTree (pid_t pid)
static bool isProcessZombie (pid_t pid)
static bool isProcessRunning (pid_t pid)
static bool isTreeAlive (pid_t pid)
static void reapProcessTree (pid_t pid)
static bool stopProcessTree (pid_t pid, size_t stopTimeout_msec)
ProcessTemplateRegistrygetProcessTemplateRegistry ()
static Calibration::PartsVec::iterator find_range (const long raw, Calibration::PartsVec::iterator beg, Calibration::PartsVec::iterator end)
std::ostream & operator<< (std::ostream &os, Calibration &c)
std::ostream & operator<< (std::ostream &os, Calibration *c)
std::ostream & operator<< (std::ostream &os, const DigitalFilter &d)
std::ostream & operator<< (std::ostream &os, const DigitalFilter *d)
std::ostream & operator<< (std::ostream &os, IOBase &inf)
std::ostream & operator<< (std::ostream &os, const IOBase::FrontType &f)
std::ostream & operator<< (std::ostream &os, PID &p)
ostreamoperator<< (std::ostream &os, const Element &el)
ostreamoperator<< (std::ostream &os, const std::shared_ptr< Element > &el)
std::ostream & operator<< (std::ostream &os, MBConfig::RTUDeviceMap &m)
std::ostream & operator<< (std::ostream &os, MBConfig::RTUDevice &d)
std::ostream & operator<< (std::ostream &os, const MBConfig::RegInfo *r)
std::ostream & operator<< (std::ostream &os, const MBConfig::RegInfo &r)
std::ostream & operator<< (std::ostream &os, const MBConfig::DeviceType &dt)
std::ostream & operator<< (std::ostream &os, const MBConfig::RSProperty &p)
std::ostream & operator<< (std::ostream &os, const MBConfig::ExchangeMode &em)
std::string to_string (const MBConfig::ExchangeMode &m)
std::string to_string (const MBConfig::SafeMode &m)
ostreamoperator<< (std::ostream &os, const MBConfig::SafeMode &m)
static long to_long (const std::string &s, const std::string &what, const std::string &myname)
static bool to_bool01 (const std::string &s, const std::string &what, const std::string &myname)
std::ostream & operator<< (std::ostream &os, RTUStorage &m)
std::ostream & operator<< (std::ostream &os, RTUStorage *m)
std::ostream & operator<< (std::ostream &os, MBSlave::BitRegProperty *p)
std::ostream & operator<< (std::ostream &os, MBSlave::BitRegProperty &p)
std::ostream & operator<< (std::ostream &os, MBSlave::IOProperty &p)
static long to_long (const std::string &s, const std::string &what, const std::string &myname)
static bool to_bool01 (const std::string &s, const std::string &what, const std::string &myname)
std::ostream & operator<< (std::ostream &os, const std::shared_ptr< OPCUAExchange::OPCAttribute > &inf)
std::ostream & operator<< (std::ostream &os, const OPCUAExchange::OPCAttribute &inf)
constexpr std::string_view getLogLevelName (opcua::LogLevel level)
 Get name of log level.
constexpr std::string_view getLogCategoryName (opcua::LogCategory category)
 Get name of log category.
std::ostream & operator<< (std::ostream &os, const SharedMemory::HistoryInfo &h)
static int get_crc_16 (uint16_t crc, unsigned char *buf, int size) noexcept
std::ostream & operator<< (std::ostream &os, UNetSender::UItem &p)

Переменные

constexpr AccessMask AccessUnknown = AccessMask(AccessMask::UNKNOWN)
constexpr AccessMask AccessNone = AccessMask(AccessMask::NONE)
constexpr AccessMask AccessRO = AccessMask(AccessMask::READ)
constexpr AccessMask AccessRW = AccessMask({AccessMask::READ, AccessMask::WRITE})
const char BadSymbols [] = {'.', '/'}
const ObjectId DefaultObjectId = -1
const ThresholdId DefaultThresholdId = -1
const ThresholdId DefaultTimerId = -1
const ObjectId AdminID = -2
const long ChannelBreakValue = std::numeric_limits<long>::max()
const unsigned short SizeOfTransportMessage =160
const unsigned short SizeOfObjectType =30
static ComPort::Speed checkSpeed []
static uint16_t crc_16_tab []
static std::shared_ptr< Configurationuconf
static std::shared_ptr< DebugStream_ulog
static const opcua::ua::WriteValue nullWriteValue = opcua::ua::WriteValue{}
static const opcua::ua::ReadValueId nullReadValueId = opcua::ua::ReadValueId{}
static unsigned short crc_16_tab []
 NAME = os.path.basename(__file__).replace(".chart.py", "")
int update_every = 5
int priority = 90000
int retries = 10000
dict config = {}
 serv = Service(config,"test")

Подробное описание

Определения базовых типов библиотеки UniSet (вспомогательные типы данных, константы, полезные функции)

Типы

◆ ByteOfMessage

typedef octet uniset::ByteOfMessage

тип для одного байта сообщения

◆ IDSeq

typedef sequence<ObjectId> uniset::IDSeq

Список идентификаторов

◆ KeyType

typedef uint64_t uniset::KeyType

уникальный ключ объекта

◆ ListObjectName

typedef std::list<std::string> uniset::ListObjectName

Список объектов типа ObjectName

◆ ObjectId

typedef long uniset::ObjectId

идентификатор объекта

◆ ObjectPtr

typedef CORBA::Object_ptr uniset::ObjectPtr

Ссылка на объект, регистрируемый в ObjectRepository

◆ ObjectsList

typedef std::list< std::shared_ptr<UniSetObject> > uniset::ObjectsList

Список подчиненных объектов

◆ ObjectType

typedef string<SizeOfObjectType> uniset::ObjectType

тип объекта

◆ ObjectVar

typedef CORBA::Object_var uniset::ObjectVar

Ссылка на объект, регистрируемый в ObjectRepository

◆ RawDataOfTransportMessage

typedef ByteOfMessage uniset::RawDataOfTransportMessage[SizeOfTransportMessage]

данные в сообщении

◆ ThresholdId

typedef long uniset::ThresholdId

идентификатор порога

◆ TimerId

typedef long uniset::TimerId

идентификатор таймера

Перечисления

◆ LampCommand

Команды для управления лампочками

Элементы перечислений
lmpOFF 

выключить

lmpON 

включить

lmpBLINK 

мигать

lmpBLINK2 

мигать

lmpBLINK3 

мигать

Функции

◆ BadSymbolsToStr()

string uniset::BadSymbolsToStr ( )

Получение запрещенных символов в виде строки '.', '/', и т.д.

◆ checkBadSymbols()

char uniset::checkBadSymbols ( const std::string & str)

Проверка на наличие недопустимых символов Запрещенные символы см. uniset::BadSymbols[]

Возвращает
Если не найдено запрещённых символов то будет возвращен 0, иначе найденный символ

◆ containsIgnoreCase()

bool uniset::containsIgnoreCase ( const std::string & text,
const std::string & pattern )
noexcept

Поиск подстроки без учёта регистра (case-insensitive substring search)

Аргументы
text- строка в которой ищем
pattern- искомая подстрока
Возвращает
true если pattern найден в text (без учёта регистра)

◆ dateToString()

string uniset::dateToString ( time_t tm = time(0),
const std::string & brk = "/" )
noexcept

Преобразование даты в строку DD/MM/YYYY

◆ explode()

uniset::IDList uniset::explode ( const std::string & str,
char sep = ',' )

Разбивка строки по указанному символу

◆ findArgParam()

int uniset::findArgParam ( const std::string & name,
int _argc,
const char *const * _argv )
inline

Проверка наличия параметра в командной строке

Аргументы
name- название параметра
_argc- argc
_argv- argv
Возвращает
Возвращает -1, если параметр не найден. Или позицию параметра, если найден.
Предупреждения
Поиск ведётся с первого аргумента, а не с нулевого!

◆ getArg2Param()

std::string uniset::getArg2Param ( const std::string & name,
int _argc,
const char *const * _argv,
const std::string & defval,
const std::string & defval2 = "" )
inlinenoexcept

получить значение, если пустое, то defval, если defval="" return defval2

◆ getArgParam()

std::string uniset::getArgParam ( const std::string & name,
int _argc,
const char *const * _argv,
const std::string & defval = "" )
inlinenoexcept

Получение параметра командной строки

Аргументы
name- название параметра
defval- значение, которое будет возвращено, если параметр не найден
Предупреждения
Поиск ведётся с первого аргумента, а не с нулевого!

◆ getLogCategoryName()

std::string_view uniset::getLogCategoryName ( opcua::LogCategory category)
constexpr

Get name of log category.

◆ getLogLevelName()

std::string_view uniset::getLogLevelName ( opcua::LogLevel level)
constexpr

Get name of log level.

◆ getObjectsList()

std::list< uniset::ConsumerInfo > uniset::getObjectsList ( const std::string & s,
std::shared_ptr< uniset::Configuration > conf = nullptr )

Функция разбора строки вида: id1@node1,id2@node2,... Если @node не указано, возвращается node=DefaultObjectId

◆ getProcessTemplateRegistry()

ProcessTemplateRegistry & uniset::getProcessTemplateRegistry ( )

Get global template registry (singleton).

◆ getSInfoList()

std::list< uniset::ParamSInfo > uniset::getSInfoList ( const std::string & s,
std::shared_ptr< uniset::Configuration > conf = nullptr )

Функция разбора строки вида: id1@node1=val1,id2@node2=val2,... Если '=' не указано, возвращается val=0 Если @node не указано, возвращается node=DefaultObjectId

◆ is_digit()

bool uniset::is_digit ( const std::string & s)
noexcept

проверка является текст в строке - числом..

Предупреждения
Числом будет считаться только строка ПОЛНОСТЬЮ состоящая из чисел. Т.е. например "-10" или "100.0" или "10 000" - числом считаться не будут!

◆ key()

uniset::KeyType uniset::key ( const uniset::ObjectId id,
const uniset::ObjectId node )

генератор уникального положительного ключа Уникальность гарантируется только для пары значений id и node.

Предупреждения
Уникальность не гарантирована, возможны коллизии

◆ now_to_timespec()

timespec uniset::now_to_timespec ( )

получение текущего времени

◆ now_to_uniset_timespec()

uniset::Timespec_var uniset::now_to_uniset_timespec ( )

получение текущего времени

◆ parseSInfo()

uniset::ParamSInfo uniset::parseSInfo ( const std::string & s,
std::shared_ptr< uniset::Configuration > conf = nullptr )
Возвращает
si.id = DefaultObjectId when parse error

◆ replace_all()

std::string uniset::replace_all ( const std::string & src,
const std::string & from,
const std::string & to )

замена всех вхождений подстроки

Аргументы
src- исходная строка
from- подстрока которая ищется (для замены)
to- строка на которую будет сделана замена

◆ timeToString()

string uniset::timeToString ( time_t tm = time(0),
const std::string & brk = ":" )
noexcept

Преобразование времени в строку HH:MM:SS

◆ to_timespec()

struct timespec uniset::to_timespec ( const std::chrono::system_clock::duration & d)

конвертирование std::chrono в posix timespec

◆ to_timeval()

struct timeval uniset::to_timeval ( const std::chrono::system_clock::duration & d)

конвертирование std::chrono в posix timeval

◆ ulog()

std::shared_ptr< DebugStream > uniset::ulog ( )
noexcept

Глобальный объект для вывода логов

◆ uni_atoi()

int uniset::uni_atoi ( const char * str)
noexcept

Преобразование строки в число (воспринимает префикс 0, как 8-ное, префикс 0x, как 16-ное, минус для отриц. чисел).

◆ uniset_conf()

std::shared_ptr< Configuration > uniset::uniset_conf ( )
noexcept

Глобальный указатель на конфигурацию (singleton)

◆ uniset_init()

std::shared_ptr< Configuration > uniset::uniset_init ( int argc,
const char *const * argv,
const std::string & xmlfile = "configure.xml" )

инициализация "глобальной" конфигурации

Переменные

◆ AdminID

const ObjectId uniset::AdminID = -2

сервисный идентификатор используемый утилитой admin

◆ BadSymbols

const char uniset::BadSymbols[] = {'.', '/'}

Запрещенные для использования в именах объектов символы

◆ checkSpeed

ComPort::Speed uniset::checkSpeed[]
static
Инициализатор
=
{
ComPort::ComSpeed9600,
ComPort::ComSpeed19200,
ComPort::ComSpeed38400,
ComPort::ComSpeed57600,
ComPort::ComSpeed4800,
ComPort::ComSpeed115200,
ComPort::ComSpeed0
}

◆ DefaultObjectId

const ObjectId uniset::DefaultObjectId = -1

Идентификатор объекта по умолчанию

◆ DefaultThresholdId

const ThresholdId uniset::DefaultThresholdId = -1

идентификатор порогов по умолчанию

◆ DefaultTimerId

const ThresholdId uniset::DefaultTimerId = -1

идентификатор таймера по умолчанию