diff --git a/src/device_controller/concrete_component/gemini/gemini_controller.py b/src/device_controller/concrete_component/gemini/gemini_controller.py index 97a1a47..dae498d 100755 --- a/src/device_controller/concrete_component/gemini/gemini_controller.py +++ b/src/device_controller/concrete_component/gemini/gemini_controller.py @@ -115,27 +115,27 @@ class DC_Gemini(DeviceController): @classmethod def encap(cls, command:str): r''' Encapsulate useful data to be ready for sending - + If data is "complete" (with stamp, and well formatted), send it as is Otherwise, add stamp and format it - + 3 types of commands: - TYPE1: '06' or '050000' - TYPE2: ':cde#' (mainly ':??#' - i.e : ':GD#', ':GR#', ...) - TYPE3: 'b?#' (bC# = Cold Start, bW# = selecting Warm Start, bR# = selecting Warm Restart) - + :Examples: - >>> tele = DC_Gemini("localhost", 11110, DEBUG=False) + >>> tele = DC_Gemini("localhost", 11110) Starting device simulator on (host:port): localhost:11110 >>> tele.encap(':GD#') - '00010000:GD#\x00' + ('00010000', '00010000:GD#\x00') >>> tele.encap(':GR#') - '00020000:GR#\x00' + ('00020000', '00020000:GR#\x00') >>> tele.close() - + # ne marche pas => '00010000:GD#\x00' ''' - + ####return bytes(self.MYSTAMP + self.STAMP_FILLER + data + "\n", "utf-8") # TYPE1 @@ -180,10 +180,10 @@ class DC_Gemini(DeviceController): r""" Extract useful data from received raw data - >>> tele = DC_Gemini("localhost", 11110, DEBUG=False) + >>> tele = DC_Gemini("localhost", 11110) Starting device simulator on (host:port): localhost:11110 >>> tele.last_stamp = '00170000' - >>> tele.uncap('001700001#') + >>> tele.uncap('00170000', '001700001#') '1' >>> tele.close() """ -- libgit2 0.21.2