CCamac -- Manages CAMAC memory maps.


#include <CCamac.h>
 class CCamac {


  static void BranchInit(int nBranch);
  static void BranchRelease(int nBranch);
  static long* Base(int nBranch);


The CCamac class consists entirely of static member functions (and data). It is used to create and manipulate maps to CAMAC branch highways.

Branches have a funny numbering system. Branches 0-7 are assumed to be in VME crate 0, Branches 8-15 in VME crate 1 and so on. The class assumes a maximum of 32 VME crates eac with at most 8 CAMAC highways installed.

Public member functions

static void BranchInit(int nBranch);

Creates a map that covers the entire branch, and stores it in the map table for re-use in case the same branch is requested in the future.

static void BranchRelease(int nBranch);

Releases a branch. This will unmap the address space that is referenced by the map. It is up to the caller to ensure that the application will no longer need to reference the branch that is being released.

static long* Base(int nBranch);

Returns the pointer to start of the memory space mapped by a branch or NULL if the branch has not yet bee mapped.


CRangeError is thrown if the branch is not in range.