VisionServer  v2.1.1-1-g21dc5465
FRC vision library
vs2::Target Class Reference

#include <target.h>

+ Inheritance diagram for vs2::Target:
+ Collaboration diagram for vs2::Target:

Public Types

enum  Status { INVALID = -1 , EXPIRED = 0 , VALID = 1 }
 

Public Member Functions

 Target ()=delete
 
 Target (const std::string &n)
 
 Target (std::string &&n)
 
 Target (const Target &)=default
 
 Target (Target &&)=default
 
virtual ~Target ()
 
const std::string & getName () const
 

Static Public Member Functions

static const std::shared_ptr< nt::NetworkTable > & ntable ()
 

Protected Member Functions

void setPos (double x, double y, double z)
 
void setAngle (double ud, double lr)
 
void setDist (double d)
 
void setExpired ()
 
void setValid ()
 

Protected Attributes

const std::string name
 
const std::shared_ptr< nt::NetworkTable > table
 

Friends

template<typename T >
class UniqueTarget
 

Detailed Description

Basic ntables target representation

Definition at line 20 of file target.h.

Member Enumeration Documentation

◆ Status

Enumerator
INVALID 
EXPIRED 
VALID 

Definition at line 28 of file target.h.

Constructor & Destructor Documentation

◆ Target() [1/5]

vs2::Target::Target ( )
delete

◆ Target() [2/5]

vs2::Target::Target ( const std::string &  n)
inline

Definition at line 35 of file target.h.

◆ Target() [3/5]

vs2::Target::Target ( std::string &&  n)
inline

Definition at line 37 of file target.h.

◆ Target() [4/5]

vs2::Target::Target ( const Target )
default

◆ Target() [5/5]

vs2::Target::Target ( Target &&  )
default

◆ ~Target()

virtual vs2::Target::~Target ( )
inlinevirtual

Definition at line 41 of file target.h.

Member Function Documentation

◆ ntable()

static const std::shared_ptr< nt::NetworkTable > & vs2::Target::ntable ( )
inlinestatic

Definition at line 23 of file target.h.

◆ getName()

const std::string & vs2::Target::getName ( ) const
inline

Definition at line 44 of file target.h.

◆ setPos()

void vs2::Target::setPos ( double  x,
double  y,
double  z 
)
inlineprotected

Definition at line 47 of file target.h.

◆ setAngle()

void vs2::Target::setAngle ( double  ud,
double  lr 
)
inlineprotected

Definition at line 52 of file target.h.

◆ setDist()

void vs2::Target::setDist ( double  d)
inlineprotected

Definition at line 56 of file target.h.

◆ setExpired()

void vs2::Target::setExpired ( )
inlineprotected

Definition at line 60 of file target.h.

◆ setValid()

void vs2::Target::setValid ( )
inlineprotected

Definition at line 63 of file target.h.

Friends And Related Function Documentation

◆ UniqueTarget

template<typename T >
friend class UniqueTarget
friend

Definition at line 21 of file target.h.

Member Data Documentation

◆ name

const std::string vs2::Target::name
protected

Definition at line 67 of file target.h.

◆ table

const std::shared_ptr<nt::NetworkTable> vs2::Target::table
protected

Definition at line 68 of file target.h.


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