Builds a TCP socket in a spearate thread.
More...
Builds a TCP socket in a spearate thread.
def gztopic_multithreading.GzCommunicator.__init__ |
( |
|
self, |
|
|
|
masterip = '127.0.0.1' , |
|
|
|
masterport = 11345 , |
|
|
|
selfport = 11451 |
|
) |
| |
Constructor.
- Parameters
-
self | Object pointer |
masterip | Master ip address, default is 127.0.0.1 |
masterport | Master port number, defult 11345 |
selfport | Socket local machine port number |
def gztopic_multithreading.GzCommunicator.Close |
( |
|
self | ) |
|
Terminate the thread.
- Parameters
-
def gztopic_multithreading.GzCommunicator.CreatePulisher |
( |
|
self, |
|
|
|
topic, |
|
|
|
messagetype |
|
) |
| |
Create a publisher.
- Parameters
-
self | Object pointer |
topic | Gztopic string |
messagetype | Message type string |
- Returns
- A GzPublisher object
def gztopic_multithreading.GzCommunicator.Publish |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg |
|
) |
| |
Pblish a message.
- Parameters
-
self | Object pointer |
topic | Gztopic string |
msg | Message object |
def gztopic_multithreading.GzCommunicator.run |
( |
|
self | ) |
|
Creates a thread and starts a socket.
- Parameters
-
def gztopic_multithreading.GzCommunicator.WhichCLient |
( |
|
self, |
|
|
|
dic, |
|
|
|
avalue |
|
) |
| |
Find the correct thread and socket.
- Parameters
-
self | Object pointer |
dic | Dictionary that stores all the threads |
avalue | A socket object |
- Returns
- Gztopic string
The documentation for this class was generated from the following file:
- Util/python_util/gztopic_multithreading.py