7 from custom_entity
import CustomEntity
8 from dynamic_graph
import (
9 addLoggerCoutOutputStream,
10 addLoggerFileOutputStream,
11 closeLoggerFileOutputStream,
12 real_time_logger_destroy,
13 real_time_logger_spin_once,
21 aCustomEntity = CustomEntity(
"a_custom_entity")
24 aCustomEntity.signals()
26 aCustomEntity.setTimeSample(0.001)
27 print(aCustomEntity.getTimeSample())
28 aCustomEntity.setStreamPrintPeriod(0.002)
29 print(aCustomEntity.getStreamPrintPeriod())
31 aCustomEntity.setLoggerVerbosityLevel(VerbosityLevel.VERBOSITY_INFO_WARNING_ERROR)
32 print(aCustomEntity.getLoggerVerbosityLevel())
34 aCustomEntity.in_double.value = i
35 aCustomEntity.out_double.recompute(i)
36 real_time_logger_spin_once()
40 aCustomEntity.setLoggerVerbosityLevel(VerbosityLevel.VERBOSITY_WARNING_ERROR)
41 print(aCustomEntity.getLoggerVerbosityLevel())
42 for i
in range(5, 10):
43 aCustomEntity.in_double.value = i
44 aCustomEntity.out_double.recompute(i)
45 real_time_logger_spin_once()
48 aCustomEntity.setLoggerVerbosityLevel(VerbosityLevel.VERBOSITY_ERROR)
49 print(aCustomEntity.getLoggerVerbosityLevel())
50 for i
in range(10, 15):
51 aCustomEntity.in_double.value = i
52 aCustomEntity.out_double.recompute(i)
53 real_time_logger_spin_once()
57 aCustomEntity.setLoggerVerbosityLevel(VerbosityLevel.VERBOSITY_NONE)
58 print(aCustomEntity.getLoggerVerbosityLevel())
59 for i
in range(15, 20):
60 aCustomEntity.in_double.value = i
61 aCustomEntity.out_double.recompute(i)
62 real_time_logger_spin_once()
65 aCustomEntity.setLoggerVerbosityLevel(VerbosityLevel.VERBOSITY_ALL)
66 print(aCustomEntity.getLoggerVerbosityLevel())
67 for i
in range(20, 25):
68 aCustomEntity.in_double.value = i
69 aCustomEntity.out_double.recompute(i)
70 real_time_logger_spin_once()
73 real_time_logger_destroy()
void closeLoggerFileOutputStream()
void addLoggerFileOutputStream(const char *filename)
void addLoggerCoutOutputStream()