Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

_pBsaBridge receives pProcessor→getHardware(), a class defined in the timing/bsa module.

The functions operating on the linked list are as follows:

devBsaPvt_t is defined in the devScBsa.h file:

Code Block
languagecpp
themeRDark
titledevBsaPvt_t
typedef struct {
    void *dpvt;
    epicsTimeStamp ts;
    int  nreq;
    int  entry_sz;
    void *bptr;
} devBsaPvt_t;


The functions operating on the linked list are as follows:

  • init_drvList:
  • prep_drvAnonimous:
    • Returns an allocated but empty driver pointer that needs to be initialized
    • Calls init_drvList, then allocates
  • init_drvList:
  • prep_drvAnonimous:
    • Returns an allocated but empty driver pointer that needs to be initialized
    • Calls init_drvList, then allocates memory for a new item in the linked list, initializes it, then adds it to the end of the linked list and returns linked list count.
  • prep_drvByPort
    • Same as prep_drvAnonimous; create new driver item of linked list but with a specific port name string
  • prep_drvByNamedRoot: 
    • Same as prep_drvAnonimous; create new driver item of linked list but with a specific named root string
  • find_drvLast. Returns the last driver found. If no driver is found in the linked list, NULL is returned.
    • Starting by calling init_drvList to make sure a linked list is initialized
    • Counts the number of elements in the linked list.
    • If they are not 0, returns the last element, otherwise returns the pointer to the empty list.
    • init_drvList to make sure a linked list is initialized
    • Counts the number of elements in the linked list.
    • If they are not 0, returns the last element, otherwise returns the pointer to the empty list.
  • find_drvByPort:
    • Returns a driver that matches the same port name. If not found, returns NULL
    • Calls init_drvList, then iterates on the linked list one element at a time starting from the first element. Once an element with a portName that is not NULL, and a string length of not zero, and a string identical to the argument port_name is found, it is returned, otherwise the next item is examined. If none is found, NULL is returned
  • find_drvyNamedRootfind_drvByPort:
    • Returns a driver that matches the same port namenamed root. If not found, returns NULL
    • Calls init_drvList, then iterates on the linked list one element at a time starting from the first element. Once an element with a portName named_root that is not NULL, and a string length of not zero, and a string identical to the argument portname_name root is found, it is returned, otherwise the next item is examined. If none is found, NULL is returned
    find_drvyNamedRoot:
  • Returns a driver that matches the same named root. If not found, returns NULL
  • Calls init_drvList, then iterates on the linked list one element at a time starting from the first element. Once an element with a named_root that is not NULL, and a string length of not zero, and a string identical to the argument name_root is found, it is returned, otherwise the next item is examined. If none is found, NULL is returned

bsaAdd

bsaAdd initializes a bsaList_t structure and stores it in the pBsaEllList ELL linked list. pBsaEllList is stored in the structure pDrvList_t of the bsaAsynDriver.cpp file. There are different structures called pDrvList_t in other files of the bsaDriver EPICS module, so care must be taken to not get confused. This is a visual pointer structure operated by bsaAdd:

Gliffy Diagram
macroId81444b6f-19c4-4b41-9aad-06a2c41e137b
displayNamebsaAdd pointer structure
namebsaAdd pointer structure
pagePin3