digitalInterruptValue method
override
Return the current value of the interrupt which is based on the type of Interrupt.
// Get the current value of a digital interrupt named "my_example_digital_interrupt"
var interruptVal = await myBoard.digitalInterruptValue('my_example_digital_interrupt');
For more information, see Board component.
Implementation
@override
Future<int> digitalInterruptValue(String digitalInterruptName, {Map<String, dynamic>? extra}) async {
final request = GetDigitalInterruptValueRequest()
..boardName = name
..digitalInterruptName = digitalInterruptName
..extra = extra?.toStruct() ?? Struct();
final response = await client.getDigitalInterruptValue(request);
return response.value.toInt();
}