![]() ![]() ![]() ![]() |
|
This module is passed to the message handlers either in a class derived from HiPi::Interrupt::Handler or to the callbacks registered with an instance of HiPi::Interrupt::Handler.
An instance of this class provides information for the messages received from the interrupt handler threads.
After a handler has been created using:
my $handler = HiPi::::Interrupt::HandlerClass->new
The following accessors are available.
Returns the action that the message is associated with. Possible values are:
Returns true if there was an error processing an instruction or interrupt, False if the message is the result of a successful instruction. When $msg->error is true then error details are contained in $msg->msgtext.
Returns the BCM GPIO Pin Number associated with the message if any. Returns -1 if the message is not associated with a particular GPIO pin.
For interrupt messages this contains the value of the pin ( 1 or 0 ) at the time of the interrupt. This means you do not have to read the pin value separately.
Returns an epoch timestamp in milliseconds for the message.
May contain text information about the message. When $msg->error is true $msg->msgtext returns the error description.
Returns the name of the pinclass handler that returned the message.