mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
sending test messages to control the power supply
This commit is contained in:
parent
a5991434e1
commit
d52fe797ad
1 changed files with 12 additions and 3 deletions
|
@ -586,10 +586,19 @@ class pyPlcHomeplug():
|
||||||
self.composeGetSwWithRamdomMac()
|
self.composeGetSwWithRamdomMac()
|
||||||
self.addToTrace("transmitting GetSwWithRamdomMac")
|
self.addToTrace("transmitting GetSwWithRamdomMac")
|
||||||
self.transmit(self.mytransmitbuffer)
|
self.transmit(self.mytransmitbuffer)
|
||||||
|
if (selection=="5"):
|
||||||
|
self.sendSpecialMessageToControlThePowerSupply(20, 1)
|
||||||
|
if (selection=="6"):
|
||||||
|
self.sendSpecialMessageToControlThePowerSupply(100, 1)
|
||||||
|
if (selection=="7"):
|
||||||
|
self.sendSpecialMessageToControlThePowerSupply(200, 1)
|
||||||
|
if (selection=="8"):
|
||||||
|
self.sendSpecialMessageToControlThePowerSupply(300, 1)
|
||||||
if (selection=="9"):
|
if (selection=="9"):
|
||||||
self.composeSpecialMessage()
|
self.sendSpecialMessageToControlThePowerSupply(400, 1)
|
||||||
self.addToTrace("transmitting SpecialMessage")
|
if (selection=="0"):
|
||||||
self.transmit(self.mytransmitbuffer)
|
self.sendSpecialMessageToControlThePowerSupply(0, 0)
|
||||||
|
|
||||||
|
|
||||||
def transmit(self, pkt):
|
def transmit(self, pkt):
|
||||||
self.sniffer.sendpacket(bytes(pkt))
|
self.sniffer.sendpacket(bytes(pkt))
|
||||||
|
|
Loading…
Reference in a new issue