SMACC2
Classes | Functions | Variables
keyboard_server_node Namespace Reference

Classes

class  KeyboardPublisher
 

Functions

def getKey ()
 
def main (args=None)
 

Variables

 settings = termios.tcgetattr(sys.stdin)
 

Function Documentation

◆ getKey()

def keyboard_server_node.getKey ( )

Definition at line 30 of file keyboard_server_node.py.

30def getKey():
31 global settings
32 tty.setraw(sys.stdin.fileno())
33 select.select([sys.stdin], [], [], 0)
34 key = sys.stdin.read(1)
35 termios.tcsetattr(sys.stdin, termios.TCSADRAIN, settings)
36 return key
37
38

Referenced by keyboard_server_node.KeyboardPublisher.timer_update().

Here is the caller graph for this function:

◆ main()

def keyboard_server_node.main (   args = None)

Definition at line 63 of file keyboard_server_node.py.

63def main(args=None):
64 rclpy.init(args=args)
65
66 node = KeyboardPublisher()
67
68 rclpy.spin(node)
69
70 # Destroy the node explicitly
71 # (optional - otherwise it will be done automatically
72 # when the garbage collector destroys the node object)
73 node.destroy_node()
74 rclpy.shutdown()
75
76

References main().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ settings

keyboard_server_node.settings = termios.tcgetattr(sys.stdin)

Definition at line 27 of file keyboard_server_node.py.