[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

HardwareButton

inherits from Object

Object <- HardwareButton



Operations

Get list of all operations

ButtonAction
ButtonPushed
ResetClass


Attributes

Get list of all attributes

TimePushed
TimeReleased


Fields

Field Type
HardwareButton: timePushed: Unsigned
timeReleased: Unsigned


Instance template

instance HardwareButton tag;
     timePushed: 0;
   timeReleased: 0;
end instance;

Class definition

#endif

Define Class HardwareButton;
    inherits from Object;

    field timePushed: Unsigned, getter;
    field timeReleased: Unsigned, getter;

    overrides ResetClass;

    attribute TimePushed: Unsigned, readOnly;
    attribute TimeReleased: Unsigned, readOnly;

    operation ButtonPushed(): Boolean, noFail;
    operation ButtonAction(pushed: Boolean);
        // Called when Button changes state
        // sends TRUE when pushed, FALSE when released
end class;