This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from tango import Database, DbDevInfo | |
from tango.server import server_run | |
from tango_simlib.tango_sim_generator import (configure_device_models, get_tango_device_server) | |
def main(): | |
db = Database() | |
sim_device = DbDevInfo() | |
sim_device.name = "sim/device/1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestSim: | |
def action_command1(self, model, tango_dev=None, data_input=None): | |
print("Sim device Command1 executed!") | |
class TestSimControl: | |
def test_action_command1(self, model, tango_dev=None, data_input=None): | |
print("SimControl device Command1 executed!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"class_name":"TestClass", | |
"dynamicAttributes":[ | |
{ | |
"basicAttributeData":{ | |
"name":"attribute1", | |
"unit":"", | |
"label":"attribute 1", | |
"description":"An arbitrary attribute 1", | |
"data_type":"Double", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tango.server import Device, DeviceMeta, attribute, command, server_run | |
class TangoTestDevice(Device): | |
__metaclass__ = DeviceMeta | |
def init_device(self): | |
super(TangoTestDevice, self).init_device() | |
self._devenum = 0 | |
self._current = 0.0 |