/usr/lib/python3/dist-packages/morse/middleware/pocolibs/overlays/viam_overlay.py is in python3-morse-simulator 1.4-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | import logging; logger = logging.getLogger("morse." + __name__)
from morse.core.services import service, async_service, interruptible
from morse.core.overlay import MorseOverlay
from morse.core import status
from morse.middleware.pocolibs_datastream import DummyPoster
class ViamModule(MorseOverlay):
def __init__(self, overlaid_object):
# Call the constructor of the parent class
MorseOverlay.__init__(self, overlaid_object)
self._cntrl = DummyPoster("viamCntrl")
def Acquire_cb(self, answer):
status, res = answer
return status, [ self._bench, self._n]
@service
def Init(self, *args):
pass
@service
def Configure(self, *args):
pass
@service
def Reset(self, *args):
pass
@service
def DriverLoad(self, *args):
pass
@service
def BusPrint(self, *args):
pass
@service
def BankCreate(self, *args):
pass
@service
def CameraCreate(self, *args):
pass
@service
def BankAddCamera(self, *args):
pass
@service
def PushFormatFilter(self, *args):
pass
@service
def UpdateFormatFilter(self, *args):
pass
@service
def PushGeoFilter(self, *args):
pass
@service
def UpdateGeoFilter(self, *args):
pass
@service
def PushLumFilter(self, *args):
pass
@service
def UpdateLumFilter(self, *args):
pass
@service
def PushColorFilter(self, *args):
pass
@service
def UpdateColorFilter(self, *args):
pass
@service
def PushImProcFilter(self, *args):
pass
@service
def UpdateImProcFilter(self, *args):
pass
@service
def PushMiscFilter(self, *args):
pass
@service
def UpdateMiscFilter(self, *args):
pass
@service
def FilterList(self, *args):
pass
@service
def FilterGetCap(self, *args):
pass
@service
def CameraListHWModes(self, *args):
pass
@service
def CameraSetHWMode(self, *args):
pass
@service
def Display(self, *args):
pass
@service
def Calibrate(self, *args):
pass
@service
def CalibrationIO(self, *args):
pass
@service
def Save(self, *args):
pass
@interruptible
@async_service
def Acquire(self, bench, n):
n = int(n)
self._n = n
self._bench = bench
if n == 0:
n = -1
self.overlaid_object.capture(self.chain_callback(self.Acquire_cb), n)
@async_service
def Stop(self, bench):
self.completed(status.SUCCESS)
def name(self):
return "viam"
|