Skip to main contentCrate sesh_ast
Source - ActionHandlerDecl
- ROS 2 Action Server:
on_action("rover/navigate") fn action_handler(goal: String) { ... } - Block
- BusDecl
- Hardware Bus declaration:
i2c bus0 = I2C(0, sda, scl, 400000); - EnumDecl
- EventHandlerDecl
- Interrupt / Hardware Event Handler:
on_event(PinChange(18, RISING)) { ... } - FnDecl
- ImportDecl
- InterruptHandlerDecl
- Hardware Interrupt Handler:
on_interrupt(18, RISING) fn handle_irq() { ... } - MatchArm
- Param
- PinDecl
- Pin declaration:
pin led = GPIO(18, OUT); - Program
- Top-level program structure
- RobotDecl
- Robot encapsulation block
- SafetyInvariantDecl
- Static & Runtime Safety Guard:
safety_invariant(self.voltage > 10.5, "LOW_BATTERY"); - SensorPipelineDecl
- Structured Sensor Data-Flow Pipeline:
sensor_pipeline imu_filter { from: I2C(0, 0x68), filter: EKF, out: Pose3D } - ServiceHandlerDecl
- ROS 2 Service Server:
on_service("rover/get_status") fn srv_handler(req: String) -> String { ... } - Span
- Source code span for error reporting and diagnostics
- StateBlock
- StateMachineDecl
- Hardware State Machine declaration:
state_machine RoverState { ... } - StateTransition
- StructDecl
- StructField
- TaskDecl
- Real-Time task declaration with explicit timing constraints
- TopicHandlerDecl
- ROS2 topic subscription handler:
on_topic("rover/cmd_vel") fn on_velocity(msg: String) { ... } - WatchdogDecl
- Hardware Watchdog Timer declaration:
watchdog wdt0 = Watchdog(100ms, CRITICAL);
- BinaryOp
- BusType
- Hardware bus type
- Expr
- Item
- Literal
- Pattern
- PinMode
- Pin configuration modes
- PinPull
- Pin pull resistors
- Stmt
- TaskPriority
- Task execution priority in Real-Time Sesh scheduler
- Type
- Primitive and user-defined data types in Sesh
- UnaryOp