xCPS
Public Member Functions | Protected Attributes | List of all members
Stopper Class Reference

#include <Stopper.h>

Collaboration diagram for Stopper:
Collaboration graph

Public Member Functions

 Stopper (int stoppernumber)
 
void enable ()
 
void disable ()
 
void initComm (CommSystem *communication)
 

Protected Attributes

int _mask
 
int _card
 
CommSystemcomm
 

Detailed Description

Author
Max Houwing
Date
November 23rd, 2015

In the class, the methods to control stoppers of the xCPS are defined. The main function of the stoppers is controlled by using the enable() method, which extends the stopper, and the disable() method, which returns the stopper to its retracted state. Enums can be used to call the stoppers, an attempt was made to keep the names logical. The number on which these enums are based are the ones found in the documentation of the xCPS machine, except for the stopper at band 5, which has been given the number 5. Note that there are no sensors available for the stopper, so it is not possible to check whether a stopper has been extended properly (sleeps may therefore come in handy to ensure correct behaviour).

Constructor & Destructor Documentation

Stopper::Stopper ( int  stoppernumber)

Initializes the stoppers. The numbers are chosen based on the number assigned to them in (hex/masks) documentation, but also enums (as defined in the header file) can be used. The masks are all hardcoded, as are the cards, since the assumption is that these won't (necessarily) need to be changed.

Member Function Documentation

void Stopper::disable ( )

Disables the stopper, i.e. retract it such that it no longer prevents an approaching block from passing.

void Stopper::enable ( )

Enables the stopper. Note: with 'enable' is meant: the stopper extends, enabling it to stop an approaching block. The stopper will stay in its extended state until disable() is called!

void Stopper::initComm ( CommSystem communication)

Initializes the commmunication between the stopper and the xCPS system. This function is called in the init() function of the xCPS class, and should otherwise only be used if the usage is known!


The documentation for this class was generated from the following files: