Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static class DRelayClass isclass LseDeviceClass
- {
- public string GetName() { return "DRelay"; }
- public LseDevice Create() { return new DRelay(); }
- public Soup GetQueries() { return queries; }
- define public QueryState = QueryUser + 1;
- define public QueryOnDelay = QueryUser + 2;
- ...
- Soup queries = Queries();
- Soup Queries()
- {
- Soup ret = Constructors.NewSoup();
- properties.SetNamedTag("state", QueryState);
- properties.SetNamedTag("on-delay", QueryOnDelay);
- return ret;
- }
- }
- void InitClasses()
- {
- DevMgr().Factory().AddClass(DRelayClass);
- }
- void Init()
- {
- // Задаем используемые типы устройств
- DevMgr().Factory().CreateType("R-50", "DRelay", "coil-resistance: 50, on-current: 0.4");
- // Собираем схему
- SchemeMgr().SetCircuit("4/1, RDM4, RU14");
- SchemeMgr().SetCircuit("4/1, RU14.1, 1115, BGP, RU7.2, 1108, MR6");
- // Устанавливаем устройства
- DevMgr().SetDevice("RU14", "R-50", "any: 'additional properties'");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement