Blame view

src/device_controller/abstract_component/detector_sensor.py 1.78 KB
12c6569f   Etienne Pallier   Ajout des nouvell...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3

"""
Filter selector (abstract) implementation

To be used as a base class (interface) for any concrete Filter selector class
"""


import sys

# from sockets_tele/
sys.path.append("..")
# from src_socket/client/
#import src.core.pyros_django.utils.celme as celme

sys.path.append("../../..")
import src.core.celme as celme


# Local application imports
4783e5b5   Etienne Pallier   GROS RENOMMAGE de...
22
#from device_controller.abstract_component.base import *
12c6569f   Etienne Pallier   Ajout des nouvell...
23
sys.path.append("../..")
4783e5b5   Etienne Pallier   GROS RENOMMAGE de...
24
from device_controller.abstract_component.base import *
12c6569f   Etienne Pallier   Ajout des nouvell...
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


# Default timeouts
TIMEOUT_SEND = 10
TIMEOUT_RECEIVE = 10



#class SocketClientTelescopeAbstract(SocketClientAbstract):
class DeviceControllerDetectorSensor(DeviceControllerAbstract):
    
    # @abstract (to be overriden)
    _cmd_device_concrete = {}
    _cmd_device_abstract = {}


    #TODO: remplacer PROTOCOL par "SOCKET-TCP", "SOCKET-UDP", "SERIAL", ou "USB"
    def __init__(self, device_host:str="localhost", device_port:int=11110, PROTOCOL:str="TCP", buffer_size=1024, DEBUG=False):
        '''
        :param device_host: server IP or hostname
        :param device_port: server port
        :param PROTOCOL: "UDP" or "TCP"
        '''
        super().__init__(device_host, device_port, PROTOCOL, buffer_size, DEBUG)
        # overwrite abstract _cmd dictionary with subclass native _cmd_native dictionary:
        #self._cmd = {**self._cmd, **self._cmd_native}




    '''
    ****************************
    ****************************
    GENERIC TELESCOPE COMMANDS (abstract methods)
    ****************************
    ****************************
    '''



    '''
    ****************************
     GENERIC GET & SET commands 
    **************************** 
    '''


    '''
    ****************************
     GENERIC DO commands 
    **************************** 
    '''