1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #pragma once
- #include <string>
- #include <list>
- enum ModuleType
- {
- Sensor=1,
- Actor=2,
- Purifier=3,
- Calculator=4,
- Storage=5,
- Transfer=6,
- };
- struct DataItem
- {
- int Id;
- std::string DataName;
- std::string Code;
- std::string DataType;
- bool Displayed;
- std::string Description;
- std::string ToString()
- {
- return Code + DataName;
- }
- };
- struct ModuleInfo
- {
- int Id;
- ModuleType Type; // 类型
- std::string Name; // 名称
- std::string Code; // 标识码
- std::string Model; // 型号
- std::string AssemblyName; // 组件程序(dll、jar)名字,含路径
- std::string ClassName; // 组件的 类名
- std::string Description; // 描述
- std::string Version; // 版本
- };
- struct DeviceInfo
- {
- int Id;
- std::string Name; // 名称
- std::string Type; // 类型
- std::string Code; // 标识码
- std::string Model; // 型号,通信组件的Code属性
- int ServerId; //
- ModuleInfo ModuleInfo; //
- std::string Description; // 描述
- std::list<DataItem> Properties;
- };
- struct ConsumerInfo{
- std::string name;
- std::string AssemblyName; // 组件程序(dll、jar)名字,含路径
- std::string ClassName; // 组件的 类名
- };
- struct DataManagerInfo{
- int Id;
- std::string Name; // 名称
- std::string Type; // 类型
- std::string Code; // 标识码
- std::string Model; // 型号,通信组件的Code属性
- int ServerId; //
- std::string Description; // 描述
- std::list<ModuleInfo> modules;
- std::list<ConsumerInfo>consumers;
- };
- struct Config
- {
- int serverId;
- std::string appName;
- };
- #include <QMutex>
- #include <QSemaphore>
- #include <QQueue>
- struct PublishData{
- };
- struct SharedData{
- QMutex* mutex;
- QSemaphore* sem;
- QQueue<PublishData>commandList;
- };
|