Skip to content

Instantly share code, notes, and snippets.

View kmadisa's full-sized avatar
🎭
Performing arts

Katleho Madisa kmadisa

🎭
Performing arts
View GitHub Profile
@kmadisa
kmadisa / TangoTestDevice.py
Last active February 21, 2019 14:22
TANGO device interface change event bug test files
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
@kmadisa
kmadisa / test_SimDD.json
Created December 4, 2021 19:23
tango-simlib simulator data description file
{
"class_name":"TestClass",
"dynamicAttributes":[
{
"basicAttributeData":{
"name":"attribute1",
"unit":"",
"label":"attribute 1",
"description":"An arbitrary attribute 1",
"data_type":"Double",
@kmadisa
kmadisa / test_module.py
Created December 4, 2021 19:27
tango-simlib python module used to override command behaviour
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!")
@kmadisa
kmadisa / TestDevice.py
Last active December 4, 2021 20:06
tango-simlib generated stub used to startup the test device server
#!/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"