#include <sys/sched.h>
#include "StringAttribute.h"
#include "IntegerAttribute.h"

#include "Device.h"

Device::Device( const char *deviceName )
     : Item( deviceName )
{
     char serverName[64];

     _port = NULL;
     _priority = PRIO_USER_DFLT;

     _attributes.add( new IntegerAttribute("priority",
					   "Device driver priority",
					   &_priority,
					   PRIO_USER_DFLT ) );
     _attributes.add( new StringAttribute("port",
					  "Device serial port",
					  &_port ) );

     strcpy( serverName, deviceName );
     strcat( serverName, "Server" );

     _attributes.add( new StringAttribute("driver",
					  "Device driver binary name",
					  &_driver,
					  serverName ) );

}

Device::~Device()
{
     Item::~Item();
}
