gclib 2.5.0
Galil Communications Library
Loading...
Searching...
No Matches
Interrupt Struct Reference

#include <gclib.hpp>

Public Types

enum  Type {
  NoInterrupts = GCLIB_NO_INTERRUPTS ,
  UserInterrupt = GCLIB_USER_INTERRUPT ,
  MotionComplete = GCLIB_MOTION_COMPLETE ,
  AllAxesMotionComplete = GCLIB_ALL_AXES_MOTION_COMPLETE ,
  ExcessPositionError = GCLIB_EXCESS_POSITION_ERROR ,
  LimitSwitch = GCLIB_LIMIT_SWITCH ,
  WatchdogTimer = GCLIB_WATCHDOG_TIMER ,
  ProgramStopped = GCLIB_PROGRAM_STOPPED ,
  CommandDone = GCLIB_COMMAND_DONE ,
  DigitalInputLow = GCLIB_DIGITAL_INPUT_LOW ,
  AllInterrupts = GCLIB_ALL_INTERRUPTS
}

Public Member Functions

 Interrupt (gclib_interrupt_t interrupt)

Public Attributes

Type type
union { 
   char   axis 
 If type is MotionComplete, holds the axis that triggered the interrupt. More...
   uint8_t   digital_input 
 If type is DigitalInputLow, holds the digital input that triggered the interrupt. More...
   uint8_t   user_interrupt 
 If type is UserInterrupt, holds the user interrupt that was triggered. More...
}; 
 Interrupt context. Only valid for MotionComplete, DigitalInputLow, and UserInterrupt.
uint8_t status
 The raw status byte generated by the controller. See the EI command reference for all possible values.

Detailed Description

An unsolicited interrupt. Use set_interrupts to configure which types are generated by the controller, and subscribe_interrupts to receive generated interrupts from the controller.

Definition at line 88 of file gclib.hpp.

Member Enumeration Documentation

◆ Type

enum Type

Flags that can be combined to select which interrupts should be enabled by set_interrupts(). Also used to categorize interrupts such as MotionComplete which correspond to a range of status bytes.

Enumerator
NoInterrupts 
UserInterrupt 
MotionComplete 
AllAxesMotionComplete 
ExcessPositionError 

Must be reenabled with set_interrupts() after occurrence.

LimitSwitch 

Must be reenabled with set_interrupts() after each occurrence.

WatchdogTimer 
ProgramStopped 

If multiple threads are running, this interrupt is only triggered when all threads are finished.

CommandDone 
DigitalInputLow 

Must be reenabled with set_interrupts() after each occurrence.

AllInterrupts 

Definition at line 92 of file gclib.hpp.

Constructor & Destructor Documentation

◆ Interrupt()

Interrupt ( gclib_interrupt_t interrupt)
inline

Definition at line 89 of file gclib.hpp.

Member Data Documentation

◆ type

Type type

Definition at line 105 of file gclib.hpp.

◆ axis

char axis

If type is MotionComplete, holds the axis that triggered the interrupt.

Definition at line 108 of file gclib.hpp.

◆ digital_input

uint8_t digital_input

If type is DigitalInputLow, holds the digital input that triggered the interrupt.

Definition at line 109 of file gclib.hpp.

◆ user_interrupt

uint8_t user_interrupt

If type is UserInterrupt, holds the user interrupt that was triggered.

Definition at line 110 of file gclib.hpp.

◆ [union]

union { ... }

Interrupt context. Only valid for MotionComplete, DigitalInputLow, and UserInterrupt.

◆ status

uint8_t status

The raw status byte generated by the controller. See the EI command reference for all possible values.

Definition at line 112 of file gclib.hpp.


The documentation for this struct was generated from the following file: