Skip to content

OcaDataset#

This document describes the device side implementation of OcaDataset. This class is documented in the AES70 standard as:

An OCA Dataset. A dataset is like a simple binary file that can be read and written., Every dataset is a separate OcaDataset object.


Overview#

Class Declaration#

The device side implementation has the following signature.

namespace aes70::device
{
  template <class Implementation>
  class OcaDataset : public OcaRoot<Implementation>
  {

  };
}

The template argument Implementation may implement the following methods.

Note

The signatures given here are just one possibility and that most methods are optional. Implement only those methods which make sense in the context of your device. See the documentation in Implementing AES70 Classes for more details.

class MyOcaDatasetImplementation
{
  // Methods defined by OcaDataset
  std::tuple<OcaUint64,OcaIOSessionHandle> OpenRead(OcaLockState RequestedLockState);
  std::tuple<OcaUint64,OcaIOSessionHandle> OpenWrite(OcaLockState RequestedLockState);
  void Close(OcaIOSessionHandle Handle);
  std::tuple<OcaBoolean,OcaLongBlob> Read(OcaIOSessionHandle Handle, OcaUint64 Position, OcaUint64 PartSize);
  void Write(OcaIOSessionHandle Handle, OcaUint64 Position, OcaLongBlob Part);
  void Clear(OcaIOSessionHandle Handle);
  OcaONo GetOwner();
  OcaString GetName();
  void SetName(OcaString Name);
  OcaString GetType();
  void SetType(OcaString Type);
  OcaBoolean GetReadOnly();
  void SetReadOnly(OcaBoolean ReadOnly);
  OcaTime GetLastModificationTime();
  std::tuple<OcaUint64,OcaUint64> GetDatasetSizes();

  // Methods defined by OcaRoot
  OcaBoolean GetLockable();
  void SetLockNoReadWrite();
  void Unlock();
  OcaString GetRole();
  void SetLockNoWrite();
  OcaLockState GetLockState();

};

Events#