Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
auryn::Device Class Reference

Abstract base class for all Device, Stimulator, etc objects. More...

#include <Device.h>

Inheritance diagram for auryn::Device:
Inheritance graph
[legend]
Collaboration diagram for auryn::Device:
Collaboration graph
[legend]

Public Member Functions

 Device ()
 Standard constructor. More...
 
void set_name (std::string s)
 Set device name. More...
 
std::string get_name ()
 Get device name. More...
 
int get_id ()
 Get numeric device id. More...
 
virtual void flush ()
 Flush to file. More...
 
virtual ~Device ()
 Standard destructor. More...
 
virtual void evolve ()
 
virtual void execute ()
 

Public Attributes

bool active
 Standard active switch. More...
 

Protected Member Functions

void init ()
 Standard initializer to be called by the constructor. More...
 
virtual void virtual_serialize (boost::archive::binary_oarchive &ar, const unsigned int version)
 
virtual void virtual_serialize (boost::archive::binary_iarchive &ar, const unsigned int version)
 

Protected Attributes

std::string device_name
 Identifying name for device. More...
 

Friends

class boost::serialization::access
 

Detailed Description

Abstract base class for all Device, Stimulator, etc objects.

Devices are executed after SpikingGroups and Connection objects in the Auryn duty cycle. Most commonly a Device will be a Monitor, but it could be a stimulator or something else too.

Constructor & Destructor Documentation

◆ Device()

Device::Device ( )

Standard constructor.

42 {
43  init();
44 }
void init()
Standard initializer to be called by the constructor.
Definition: Device.cpp:32
Here is the call graph for this function:

◆ ~Device()

Device::~Device ( )
virtual

Standard destructor.

47 {
48 }

Member Function Documentation

◆ evolve()

virtual void auryn::Device::evolve ( )
inlinevirtual

Virtual evolve function to be called in central simulation loop in System

99 { };

◆ execute()

virtual void auryn::Device::execute ( )
inlinevirtual

◆ flush()

void Device::flush ( )
virtual

Flush to file.

Reimplemented in auryn::Monitor, and auryn::BinarySpikeMonitor.

59 {
60 }

◆ get_id()

int Device::get_id ( )

Get numeric device id.

73 {
74  return device_id;
75 }

◆ get_name()

std::string Device::get_name ( )

Get device name.

68 {
69  return device_name;
70 }
std::string device_name
Identifying name for device.
Definition: Device.h:67

◆ init()

void Device::init ( )
protected

Standard initializer to be called by the constructor.

33 {
34  device_id = device_id_count++;
35  std::stringstream default_name;
36  default_name << "Device" << get_id();
37  set_name(default_name.str());
38  active = true;
39 }
void set_name(std::string s)
Set device name.
Definition: Device.cpp:62
int get_id()
Get numeric device id.
Definition: Device.cpp:72
bool active
Standard active switch.
Definition: Device.h:78
Here is the call graph for this function:

◆ set_name()

void Device::set_name ( std::string  s)

Set device name.

63 {
64  device_name = str;
65 }
std::string device_name
Identifying name for device.
Definition: Device.h:67

◆ virtual_serialize() [1/2]

void Device::virtual_serialize ( boost::archive::binary_oarchive &  ar,
const unsigned int  version 
)
protectedvirtual

◆ virtual_serialize() [2/2]

void Device::virtual_serialize ( boost::archive::binary_iarchive &  ar,
const unsigned int  version 
)
protectedvirtual

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Functions necesssary for serialization and loading saving to netstate files.

Member Data Documentation

◆ active

bool auryn::Device::active

Standard active switch.

◆ device_name

std::string auryn::Device::device_name
protected

Identifying name for device.


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