Firmware
Public Member Functions | Static Public Member Functions | List of all members
TAP_ESC Class Reference
Inheritance diagram for TAP_ESC:
cdev::CDev ModuleParams ListNode< ModuleParams *>

Public Member Functions

 TAP_ESC (char const *const device, uint8_t channels_count)
 
void run () override
 
virtual int init ()
 
virtual int ioctl (cdev::file_t *filp, int cmd, unsigned long arg)
 Perform an ioctl operation on the device. More...
 
void cycle ()
 
- Public Member Functions inherited from cdev::CDev
 CDev (const char *devname)
 Constructor. More...
 
virtual int open (file_t *filep)
 Handle an open of the device. More...
 
virtual int close (file_t *filep)
 Handle a close of the device. More...
 
virtual ssize_t read (file_t *filep, char *buffer, size_t buflen)
 Perform a read from the device. More...
 
virtual ssize_t write (file_t *filep, const char *buffer, size_t buflen)
 Perform a write to the device. More...
 
virtual off_t seek (file_t *filep, off_t offset, int whence)
 Perform a logical seek operation on the device. More...
 
virtual int poll (file_t *filep, px4_pollfd_struct_t *fds, bool setup)
 Perform a poll setup/teardown operation. More...
 
const char * get_devname () const
 Get the device name. More...
 
- Public Member Functions inherited from ModuleParams
 ModuleParams (ModuleParams *parent)
 
void setParent (ModuleParams *parent)
 Sets the parent module. More...
 
 ModuleParams (const ModuleParams &)=delete
 
ModuleParamsoperator= (const ModuleParams &)=delete
 
 ModuleParams (ModuleParams &&)=delete
 
ModuleParamsoperator= (ModuleParams &&)=delete
 
- Public Member Functions inherited from ListNode< ModuleParams *>
void setSibling (ModuleParams * sibling)
 
const ModuleParamsgetSibling () const
 

Static Public Member Functions

static int task_spawn (int argc, char *argv[])
 
static TAP_ESCinstantiate (int argc, char *argv[])
 
static int custom_command (int argc, char *argv[])
 
static int print_usage (const char *reason=nullptr)
 

Additional Inherited Members

- Protected Member Functions inherited from cdev::CDev
virtual pollevent_t poll_state (file_t *filep)
 Check the current state of the device for poll events from the perspective of the file. More...
 
virtual void poll_notify (pollevent_t events)
 Report new poll events. More...
 
virtual void poll_notify_one (px4_pollfd_struct_t *fds, pollevent_t events)
 Internal implementation of poll_notify. More...
 
virtual int open_first (file_t *filep)
 Notification of the first open. More...
 
virtual int close_last (file_t *filep)
 Notification of the last close. More...
 
virtual int register_class_devname (const char *class_devname)
 Register a class device name, automatically adding device class instance suffix if need be. More...
 
virtual int unregister_class_devname (const char *class_devname, unsigned class_instance)
 Register a class device name, automatically adding device class instance suffix if need be. More...
 
void lock ()
 Take the driver lock. More...
 
void unlock ()
 Release the driver lock.
 
- Protected Member Functions inherited from ModuleParams
virtual void updateParams ()
 Call this method whenever the module gets a parameter change notification. More...
 
virtual void updateParamsImpl ()
 The implementation for this is generated with the macro DEFINE_PARAMETERS()
 
- Protected Attributes inherited from cdev::CDev
px4_sem_t _lock
 lock to protect access to all class members (also for derived classes)
 
- Protected Attributes inherited from ListNode< ModuleParams *>
ModuleParams_sibling
 
- Static Protected Attributes inherited from cdev::CDev
static const px4_file_operations_t fops = {}
 Pointer to the default cdev file operations table; useful for registering clone devices etc.
 

Member Function Documentation

§ custom_command()

int TAP_ESC::custom_command ( int  argc,
char *  argv[] 
)
static
See also
ModuleBase

§ instantiate()

TAP_ESC * TAP_ESC::instantiate ( int  argc,
char *  argv[] 
)
static
See also
ModuleBase

§ ioctl()

int TAP_ESC::ioctl ( cdev::file_t filep,
int  cmd,
unsigned long  arg 
)
virtual

Perform an ioctl operation on the device.

The default implementation handles DIOC_GETPRIV, and otherwise returns -ENOTTY. Subclasses should call the default implementation for any command they do not handle themselves.

Parameters
filepPointer to the NuttX file structure.
cmdThe ioctl command value.
argThe ioctl argument value.
Returns
OK on success, or -errno otherwise.

Reimplemented from cdev::CDev.

§ print_usage()

int TAP_ESC::print_usage ( const char *  reason = nullptr)
static
See also
ModuleBase

§ run()

void TAP_ESC::run ( )
override
See also
ModuleBase::run()
ModuleBase

§ task_spawn()

int TAP_ESC::task_spawn ( int  argc,
char *  argv[] 
)
static
See also
ModuleBase

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