My Project
mrmShared
src
sfp.h
1
/*************************************************************************\
2
* Copyright (c) 2014 Brookhaven Science Associates, as Operator of
3
* Brookhaven National Laboratory.
4
* Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland
5
* mrfioc2 is distributed subject to a Software License Agreement found
6
* in file LICENSE that is included with this distribution.
7
\*************************************************************************/
8
#ifndef SFP_H
9
#define SFP_H
10
11
#include <string>
12
#include <vector>
13
14
#include <epicsMutex.h>
15
16
class
epicsShareClass SFP :
public
mrf::ObjectInst
<SFP> {
17
volatile
unsigned
char
* base;
18
typedef
std::vector<epicsUInt8> buffer_t;
19
buffer_t buffer;
20
bool
valid;
21
mutable
epicsMutex guard;
22
23
epicsInt16 read16(
unsigned
int
)
const
;
24
public
:
25
SFP(
const
std::string& n,
volatile
unsigned
char
* reg);
26
virtual
~SFP();
27
28
virtual
void
lock()
const
{guard.lock();};
29
virtual
void
unlock()
const
{guard.unlock();};
30
31
bool
junk()
const
{
return
0;}
32
void
updateNow(
bool
=
true
);
33
34
double
linkSpeed()
const
;
35
double
temperature()
const
;
36
double
powerTX()
const
;
37
double
powerRX()
const
;
38
39
std::string vendorName()
const
;
40
std::string vendorPart()
const
;
41
std::string vendorRev()
const
;
42
std::string serial()
const
;
43
std::string manuDate()
const
;
44
45
void
report()
const
;
46
47
};
48
49
#endif
// SFP_H
mrf::ObjectInst
User implementation hook.
Definition:
object.h:460
Generated by
1.9.1