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

#include <Band.h>

Collaboration diagram for Band:
Collaboration graph

Public Member Functions

 Band (int bandnumber)
 
void enable ()
 
void disable ()
 
void initComm (CommSystem *communication)
 

Protected Attributes

int _mask
 
int _card
 
CommSystemcomm
 

Detailed Description

Author
Max Houwing
Date
November 23, 2015

Class that controls the bands of the xCPS (the terms 'band' and 'belt' are used interchangeably for the xCPS machine, but describe the same thing!) Enable() and disable() methods are available to turn the bands on and off, respectively. The masks and card numbers are hardcoded into the constructor, and are assigned based on the band number that is used as argument. There are enums available as input to this constructor as well, these are defined in the xCPS class. They are simply 'band1' through 'band6', and correspond to the numbers on the machine schematic.

Remarks
There are no sensors available to check if the belt has indeed been turned on (or off), so unusual behaviour might be solved by using (u)sleep commands to allow the PCI cards some time to write the necessary bits (i.e. the program might be executing faster than the PCI cards can write)

Constructor & Destructor Documentation

Band::Band ( int  bandnumber)

Initializes the Band class with hardcoded masks assigned for each of the bands. Also, instead of the 'bandnumber' integer, enums can also be used: band1, band2, band3, band4, band5, band6. The numbers correspond to the belt numbers as labeled on the machine schematic.

Member Function Documentation

void Band::disable ( )

Disables the band, stopping it from running. Take care that the block most likely will not be stationary immediately. Allowing some time between disable() and the next operation (if it involves the block) might be helpful.

void Band::enable ( )

Enables the band by writing its mask to the output. Note that the band will keep running until disable() is called!

void Band::initComm ( CommSystem communication)

Initializes the commmunication between the band 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: