EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Network Accessable Data
From: Marty Kraimer <[email protected]>
Cc: [email protected]
Date: Wed, 20 Jul 2005 14:37:07 -0500
Attached is a set of interfaces for network accessable data which has the following attributes:

1) It provides introspection of primitive types, arrays, and structures.
2) It could be implement easily in Java and C++
3) Nothing is implied about how to create storage for data, onlu how to access it.


Taking Bob's suggestion na instead of nad is used.

Marty


enum naType {
    naTypeBoolean,     // NaBoolean
    naTypeOctet,       // NaOctet
    naTypeInt16,       // NaInt16
    naTypeUInt16,      // NaUInt16
    naTypeInt32,       // NaInt32
    naTypeUInt32,      // NaUInt32
    naTypeInt64,       // NaInt64
    naTypeUInt64,      // NaUInt64
    naTypeFloat32,     // NaFloat32
    naTypeFloat64,     // NaFloat64
    naTypeString,      // NaString
    naTypeArray,       // NaArray
    naTypeStruct,      // NaStruct
    naTypeMDArray,     // NaMDArray
    // Following are convenience types
    naTypeTimeStamp,   // NaTimeStamp
    naTypeEnum,        // NaEnum
    naTypeMap          // NaMap
};

interface NaBoolean {
    void get();
    void put(epicsBoolean val);
};

interface NaOctet {
public:
    octet get();
    void put(octet val);
};

interface NaInt16 {
public:
    int16 get();
    void put(int16 val);
};

interface NaUInt16 {
public:
    uint16 get();
    void put(uint16 val);
};

interface NaInt32 {
public:
    int32 get();
    void put(int32 val);
};

interface NaUInt32 {
public:
    uint32 get();
    void put(uint32 val);
};

interface NaInt64 {
    int64 get();
    void put(int64 val);
};

interface NaUInt64 {
    uint64 get();
    void put(uint64 val);
};

interface NaFloat32 {
    float32 get();
    void put(float32 val);
};

interface NaFloat64 {
    float64 get();
    void put(float64 val);
};
    
interface NaString {
   int32 get(int32 offset, int32 len, octet[] pto);
   int32 put(int32 offset, int32 len, octet[] pfrom);
   void reserve(int32 capacity);
   int32 capacity();
   bool mutable();
}; 

interface NaStruct {
    int16 getNfields();
    naType getType(int16 index); // naTypeBoolean,...,naTypeMap
    Interface getInterface(int16 index); NaBoolean,...,NaMap
};

interface NaArray {
   naType getType(); // naTypeOctet,...naTypeStruct
   naType getNelements();
   Interface getInterface(); NaOctetArray,...,NaStructArray
   void reserve(int32 capacity);
   int32 capacity();
   bool mutable();
};

interface NaArrayArray {
    NaArray getInterface(int32 index);
};

interface NaOctetArray {
   int32 get(int32 offset, int32 len, octet[] pto);
   int32 put(int32 offset, int32 len, octet[] pfrom);
}; 

interface NaInt16Array {
   int32 get(int32 offset, int32 len, int16[] pto);
   int32 put(int32 offset, int32 len, int16[] pfrom);
}; 

interface NaUInt16Array {
   int32 get(int32 offset, int32 len, uint16[] pto);
   int32 put(int32 offset, int32 len, uint16[] pfrom);
}; 

interface NaInt32Array {
   int32 get(int32 offset, int32 len, int32[] pto);
   int32 put(int32 offset, int32 len, int32[] pfrom);
}; 

interface NaUInt32Array {
   int32 get(int32 offset, int32 len, uint32[] pto);
   int32 put(int32 offset, int32 len, uint32[] pfrom);
}; 

interface NaInt64Array {
   int32 get(int32 offset, int32 len, int64[] pto);
   int32 put(int32 offset, int32 len, int64[] pfrom);
}; 

interface NaUInt64Array {
   int32 get(int32 offset, int32 len, uint64[] pto);
   int32 put(int32 offset, int32 len, uint64[] pfrom);
}; 

interface NaStringArray {
    NaString getInterface(int32 index);
};

interface NaStructArray {
    NaStruct getInterface(int32 index);
};

struct NaMDArray { TBD };
struct EpicsTimeStamp {
    int64 seconds;
    int32  nanoseconds;
};

interface NaTimeStamp {
    void get(EpicsTimeStamp timeStamp);
    void put(EpicsTimeStamp timeStamp);
};

interface NaEnum {
    int16 getIndex();
    void  setIndex();
    NaString getChoice(int16 index);
}

interface NaMap { TBD};


Replies:
Data Interfaces Kay-Uwe Kasemir
References:
FW: Standard String Jeff Hill
Re: FW: Standard String Benjamin Franksen
Re: Standard String Kay-Uwe Kasemir
Re: Standard String Marty Kraimer

Navigate by Date:
Prev: Re: Standard String Benjamin Franksen
Next: Re: Type descriptor vs. enum Benjamin Franksen
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Standard String Marty Kraimer
Next: Data Interfaces Kay-Uwe Kasemir
Index: 2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·