vdr  2.2.0
Public Member Functions | Private Member Functions | List of all members
cDiseqcPositioner Class Reference

#include <diseqc.h>

Public Member Functions

 cDiseqcPositioner (void)
 
virtual void Drive (ePositionerDirection Direction)
 
virtual void Step (ePositionerDirection Direction, uint Steps=1)
 
virtual void Halt (void)
 
virtual void SetLimit (ePositionerDirection Direction)
 
virtual void DisableLimits (void)
 
virtual void EnableLimits (void)
 
virtual void StorePosition (uint Number)
 
virtual void RecalcPositions (uint Number)
 
virtual void GotoPosition (uint Number, int Longitude)
 
virtual void GotoAngle (int Longitude)
 
- Public Member Functions inherited from cPositioner
int Capabilities (void) const
 
void SetFrontend (int Frontend)
 
int HardLimitLongitude (ePositionerDirection Direction) const
 
int LastLongitude (void) const
 
int TargetLongitude (void) const
 
virtual cString Error (void) const
 
virtual int CurrentLongitude (void) const
 
virtual bool IsMoving (void) const
 

Private Member Functions

void SendDiseqc (uint8_t *Codes, int NumCodes)
 

Additional Inherited Members

- Public Types inherited from cPositioner
enum  ePositionerCapabilities {
  pcCanNothing = 0x0000, pcCanDrive = 0x0001, pcCanStep = 0x0002, pcCanHalt = 0x0004,
  pcCanSetLimits = 0x0008, pcCanDisableLimits = 0x0010, pcCanEnableLimits = 0x0020, pcCanStorePosition = 0x0040,
  pcCanRecalcPositions = 0x0080, pcCanGotoPosition = 0x0100, pcCanGotoAngle = 0x0200
}
 
enum  ePositionerDirection { pdLeft, pdRight }
 
- Static Public Member Functions inherited from cPositioner
static int NormalizeAngle (int Angle)
 
static int HorizonLongitude (ePositionerDirection Direction)
 
static cPositionerGetPositioner (void)
 
static void DestroyPositioner (void)
 
- Protected Member Functions inherited from cPositioner
 cPositioner (void)
 
virtual ~cPositioner ()
 
void SetCapabilities (int Capabilities)
 
int Frontend (void) const
 
void StartMovementTimer (int Longitude)
 
- Static Protected Member Functions inherited from cPositioner
static int CalcHourAngle (int Longitude)
 
static int CalcLongitude (int HourAngle)
 

Detailed Description

Definition at line 17 of file diseqc.h.

Constructor & Destructor Documentation

cDiseqcPositioner::cDiseqcPositioner ( void  )

Member Function Documentation

void cDiseqcPositioner::DisableLimits ( void  )
virtual

Disables the soft limits for the dish movement.

Reimplemented from cPositioner.

Definition at line 105 of file diseqc.c.

References SendDiseqc().

void cDiseqcPositioner::Drive ( ePositionerDirection  Direction)
virtual

Continuously move the dish to the given Direction until Halt() is called or it hits the soft or hard limit.

Reimplemented from cPositioner.

Definition at line 78 of file diseqc.c.

References cPositioner::pdLeft, and SendDiseqc().

void cDiseqcPositioner::EnableLimits ( void  )
virtual

Enables the soft limits for the dish movement.

Reimplemented from cPositioner.

Definition at line 111 of file diseqc.c.

References SendDiseqc().

void cDiseqcPositioner::GotoAngle ( int  Longitude)
virtual

Move the dish to the given angular position.

Longitude can be in the range -1800...+1800. A positive sign indicates a position east of Greenwich, while western positions have a negative sign. The absolute value is in "degrees * 10", which allows for a resolution of 1/10 of a degree. A derived class must call the base class function to have the target longitude stored.

Reimplemented from cPositioner.

Definition at line 136 of file diseqc.c.

References cPositioner::CalcHourAngle(), cPositioner::GotoAngle(), and SendDiseqc().

void cDiseqcPositioner::GotoPosition ( uint  Number,
int  Longitude 
)
virtual

Move the dish to the satellite position stored under the given Number.

Number must be one of the values previously used with StorePosition(). The special value 0 shall move the dish to a "reference position", which usually is due south (or north, if you're on the southern hemisphere). Longitude will be used to calculate how long it takes to move the dish from its current position to the given Longitude. A derived class must call the base class function to have the target longitude stored.

Reimplemented from cPositioner.

Definition at line 129 of file diseqc.c.

References cPositioner::GotoPosition(), and SendDiseqc().

void cDiseqcPositioner::Halt ( void  )
virtual

Stop any ongoing motion of the dish.

Reimplemented from cPositioner.

Definition at line 93 of file diseqc.c.

References SendDiseqc().

void cDiseqcPositioner::RecalcPositions ( uint  Number)
virtual

Take the difference between the current actual position of the dish and the position stored with the given Number, and apply the difference to all stored positions.

Reimplemented from cPositioner.

Definition at line 123 of file diseqc.c.

References SendDiseqc().

void cDiseqcPositioner::SendDiseqc ( uint8_t *  Codes,
int  NumCodes 
)
private
void cDiseqcPositioner::SetLimit ( ePositionerDirection  Direction)
virtual

Set the soft limit of the dish movement in the given Direction to the current position.

Reimplemented from cPositioner.

Definition at line 99 of file diseqc.c.

References cPositioner::pdLeft, and SendDiseqc().

void cDiseqcPositioner::Step ( ePositionerDirection  Direction,
uint  Steps = 1 
)
virtual

Move the dish the given number of Steps in the given Direction.

The maximum number of steps a particular positioner can do in a single call may be limited. A "step" is the smallest possible movement the positioner can make, which is typically 0.1 degrees.

Reimplemented from cPositioner.

Definition at line 84 of file diseqc.c.

References min(), cPositioner::pdLeft, and SendDiseqc().

void cDiseqcPositioner::StorePosition ( uint  Number)
virtual

Store the current position as a satellite position with the given Number.

Number can be in the range 1...255. However, a particular positioner may only have a limited number of satellite positions it can store.

Reimplemented from cPositioner.

Definition at line 117 of file diseqc.c.

References SendDiseqc().


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