|
UniSet 2.32.1
|
Пространства имен | |
| namespace | ModbusTCPCore |
Классы | |
| class | BackendClickHouse |
| class | BackendOpenTSDB |
| class | Calibration |
| class | CardList |
| class | ClickHouseInterface |
| class | ClickHouseTagsConfig |
| class | ComediInterface |
| class | CommFailed |
| 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 | ConfirmMessage |
| struct | ConsumerInfo |
| class | DBInterface |
| struct | DBInterfaceDeleter |
| class | DBNetInterface |
| class | DBResult |
| class | DBRowIterator |
| class | DBServer |
| class | DBServer_MySQL |
| class | DBServer_PostgreSQL |
| The DBServer_PostgreSQL class Реализация работы с PostgreSQL. Т.к. основная работа сервера - это частая запись данных, то сделана следующая оптимизация: Создаётся insert-буфер настраиваемого размера (ibufMaxSize). Как только буфер заполняется, он пишется в БД одним "оптимизированным" запросом. Помимо этого буфер скидывается, если прошло ibufSyncTimeout мсек или если пришёл запрос на UPDATE данных. Подробнее... | |
| class | DBServer_SQLite |
| class | DelayTimer |
| class | DigitalFilter |
| class | Element |
| class | EventLoopServer |
| The EventLoopServer class Реализация общей части всех процессов использующих libev. Содержит свой (динамический) eventloop;. Подробнее... | |
| class | EvWatcher |
| class | Exception |
| class | FakeComediInterface |
| class | FakeIOControl |
| class | HourGlass |
| class | HttpResolver |
| class | IDList |
| class | InvalidObjectName |
| class | IOBadParam |
| struct | IOBase |
| class | IOConfig |
| class | IOConfig_XML |
| class | IOControl |
| class | IOController |
| class | IONotifyController |
| class | IORFile |
| class | ios_fmt_restorer |
| class | LogAgregator |
| class | LogDB |
| class | LogicException |
| class | LogReader |
| class | LogServer |
| class | LogSession |
| class | LProcessor |
| class | LT_Object |
| class | MBConfig |
| class | MBExchange |
| class | MBSlave |
| class | MBTCPMaster |
| class | MBTCPMultiMaster |
| class | Message |
| 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 | MQTTPublisher |
| class | MulticastReceiveTransport |
| class | MulticastSendTransport |
| class | MulticastSocketU |
| class | MySQLInterface |
| class | NameNotFound |
| struct | NodeInfo |
| class | NSResolveError |
| class | ObjectIndex |
| class | ObjectIndex_Array |
| class | ObjectIndex_hashXML |
| class | ObjectIndex_idXML |
| class | ObjectIndex_XML |
| struct | ObjectInfo |
| class | ObjectNameAlready |
| class | ObjectRepository |
| class | OmniThreadCreator |
| class | OPCUAClient |
| class | OPCUAExchange |
| class | OPCUAServer |
| class | ORepFailed |
| class | OutOfRange |
| struct | ParamSInfo |
| class | PassiveCondTimer |
| Пассивный таймер с режимом засыпания (ожидания) Подробнее... | |
| class | PassiveLProcessor |
| class | PassiveObject |
| class | PassiveTimer |
| Пассивный таймер Подробнее... | |
| class | PID |
| class | PostgreSQLInterface |
| struct | ProducerInfo |
| class | ProxyManager |
| class | Pulse |
| class | ResolveNameError |
| class | RRDServer |
| class | RTUExchange |
| class | RTUStorage |
| class | RunLock |
| class | Schema |
| class | SchemaXML |
| class | SensorMessage |
| class | Service |
| class | SharedMemory |
| struct | SimpleInfo |
| class | SMInterface |
| class | SMonitor |
| class | SQLiteInterface |
| class | SViewer |
| class | SystemError |
| class | SystemMessage |
| class | TA2D |
| class | TAND |
| class | TCPCheck |
| class | TDelay |
| class | TextMessage |
| class | ThreadCreator |
| class | TimeOut |
| class | TimerMessage |
| struct | Timespec |
| class | TNOT |
| class | TOR |
| struct | TransportMessage |
| class | Trigger |
| class | TriggerAND |
| class | TriggerOR |
| class | TriggerOUT |
| class | TRS |
| class | TSEL_R |
| class | UDPReceiveTransport |
| class | UDPReceiveU |
| class | UDPSendTransport |
| class | UDPSocketU |
| class | UInterface |
| class | UNetExchange |
| class | UNetReceiver |
| class | UNetReceiveTransport |
| class | UNetSender |
| class | UNetSendTransport |
| class | UniExchange |
| class | uniset_rwmutex |
| class | uniset_rwmutex_rlock |
| class | uniset_rwmutex_wrlock |
| class | UniSetActivator |
| class | UniSetManager |
| class | UniSetObject |
| class | UniSetTimer |
| Базовый интерфейс пассивных таймеров Подробнее... | |
| class | UniXML |
| class | UniXML_iterator |
| class | USocket |
| class | UTCPSocket |
| class | UTCPStream |
| class | UWebSocketGate |
| class | VMonitor |
| class | VoidMessage |
| class | WDTInterface |
Определения типов | |
| typedef std::shared_ptr< DBInterface > | create_dbinterface_t() |
| typedef std::shared_ptr< uniset::VoidMessage > | VoidMessagePtr |
| typedef Poco::Timespan::TimeDiff | timeout_t |
| typedef std::shared_ptr< UniSetActivator > | UniSetActivatorPtr |
| 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< NodeInfo > | ListOfNode |
| 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< SimpleInfo > | SimpleInfoSeq |
| typedef sequence< ObjectId > | IDSeq |
Перечисления | |
| enum | LampCommand { lmpOFF = 0 , lmpON = 1 , lmpBLINK = 2 , lmpBLINK2 = 3 , lmpBLINK3 = 4 } |
Функции | |
| std::shared_ptr< Configuration > | uniset_conf () noexcept |
| std::shared_ptr< DebugStream > | ulog () noexcept |
| std::shared_ptr< Configuration > | uniset_init (int argc, const char *const *argv, const std::string &xmlfile="configure.xml") |
| std::shared_ptr< Configuration > | uniset_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< ParamSInfo > | getSInfoList (const std::string &s, std::shared_ptr< uniset::Configuration > conf=nullptr) |
| std::list< uniset::ConsumerInfo > | getObjectsList (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 | 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 |
| 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) |
| ostream & | operator<< (ostream &os, UniSetObject &obj) |
| std::ostream & | operator<< (std::ostream &os, LogAgregator &la) |
| std::ostream & | operator<< (std::ostream &os, std::shared_ptr< LogAgregator > la) |
| 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) |
| 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) |
| ostream & | operator<< (ostream &os, const Element &el) |
| ostream & | operator<< (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::SafeMode &m) |
| ostream & | operator<< (ostream &os, const MBConfig::SafeMode &m) |
| 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) |
| std::ostream & | operator<< (std::ostream &os, const std::shared_ptr< OPCUAExchange::OPCAttribute > &inf) |
| std::ostream & | operator<< (std::ostream &os, const OPCUAExchange::OPCAttribute &inf) |
| 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) |
Переменные | |
| 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< Configuration > | uconf |
| static std::shared_ptr< DebugStream > | _ulog |
| static const UA_WriteValue | nullWriteValue = UA_WriteValue{} |
| 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 (вспомогательные типы данных, константы, полезные функции)
| typedef octet uniset::ByteOfMessage |
тип для одного байта сообщения
| typedef sequence<ObjectId> uniset::IDSeq |
Список идентификаторов
| typedef uint64_t uniset::KeyType |
уникальный ключ объекта
| typedef std::list<std::string> uniset::ListObjectName |
Список объектов типа ObjectName
| typedef long uniset::ObjectId |
идентификатор объекта
| typedef CORBA::Object_ptr uniset::ObjectPtr |
Ссылка на объект, регистрируемый в ObjectRepository
| typedef std::list< std::shared_ptr<UniSetObject> > uniset::ObjectsList |
Список подчиненных объектов
| typedef string<SizeOfObjectType> uniset::ObjectType |
тип объекта
| typedef CORBA::Object_var uniset::ObjectVar |
Ссылка на объект, регистрируемый в ObjectRepository
| typedef ByteOfMessage uniset::RawDataOfTransportMessage[SizeOfTransportMessage] |
данные в сообщении
| typedef long uniset::ThresholdId |
идентификатор порога
| typedef long uniset::TimerId |
идентификатор таймера
| enum uniset::LampCommand |
| string uniset::BadSymbolsToStr | ( | ) |
Получение запрещенных символов в виде строки '.', '/', и т.д.
| char uniset::checkBadSymbols | ( | const std::string & | str | ) |
Проверка на наличие недопустимых символов Запрещенные символы см. uniset::BadSymbols[]
|
noexcept |
Преобразование даты в строку DD/MM/YYYY
| uniset::IDList uniset::explode | ( | const std::string & | str, |
| char | sep = ',' ) |
Разбивка строки по указанному символу
|
inline |
Проверка наличия параметра в командной строке
| name | - название параметра |
| _argc | - argc |
| _argv | - argv |
|
inlinenoexcept |
получить значение, если пустое, то defval, если defval="" return defval2
|
inlinenoexcept |
Получение параметра командной строки
| name | - название параметра |
| defval | - значение, которое будет возвращено, если параметр не найден |
| std::list< uniset::ConsumerInfo > uniset::getObjectsList | ( | const std::string & | s, |
| std::shared_ptr< uniset::Configuration > | conf = nullptr ) |
Функция разбора строки вида: id1@node1,id2@node2,... Если @node не указано, возвращается node=DefaultObjectId
| 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
|
noexcept |
проверка является текст в строке - числом..
| uniset::KeyType uniset::key | ( | const uniset::ObjectId | id, |
| const uniset::ObjectId | node ) |
генератор уникального положительного ключа Уникальность гарантируется только для пары значений id и node.
| timespec uniset::now_to_timespec | ( | ) |
получение текущего времени
| uniset::Timespec_var uniset::now_to_uniset_timespec | ( | ) |
получение текущего времени
| std::string uniset::replace_all | ( | const std::string & | src, |
| const std::string & | from, | ||
| const std::string & | to ) |
замена всех вхождений подстроки
| src | - исходная строка |
| from | - подстрока которая ищется (для замены) |
| to | - строка на которую будет сделана замена |
|
noexcept |
Преобразование времени в строку HH:MM:SS
| struct timespec uniset::to_timespec | ( | const std::chrono::system_clock::duration & | d | ) |
конвертирование std::chrono в posix timespec
| struct timeval uniset::to_timeval | ( | const std::chrono::system_clock::duration & | d | ) |
конвертирование std::chrono в posix timeval
|
noexcept |
Глобальный объект для вывода логов
|
noexcept |
Преобразование строки в число (воспринимает префикс 0, как 8-ное, префикс 0x, как 16-ное, минус для отриц. чисел)
|
noexcept |
Глобальный указатель на конфигурацию (singleton)
| std::shared_ptr< Configuration > uniset::uniset_init | ( | int | argc, |
| const char *const * | argv, | ||
| const std::string & | xmlfile = "configure.xml" ) |
инициализация "глобальной" конфигурации
| const ObjectId uniset::AdminID = -2 |
сервисный идентификатор используемый утилитой admin
| const char uniset::BadSymbols[] = {'.', '/'} |
Запрещенные для использования в именах объектов символы
|
static |
| const ObjectId uniset::DefaultObjectId = -1 |
Идентификатор объекта по умолчанию
| const ThresholdId uniset::DefaultThresholdId = -1 |
идентификатор порогов по умолчанию
| const ThresholdId uniset::DefaultTimerId = -1 |
идентификатор таймера по умолчанию