Skip to content

Commit

Permalink
base: add SNMP module.
Browse files Browse the repository at this point in the history
Over time, several SNMP device support have been implemented, most (or
all) of them derived from DESY's implementation, including one from
Sheng Peng, Diamond's and NSCL/FRIB. By 2013, most were willing to test
NSCL/FRIB's implementation or to switch to it [1]. Advantages by then
were:

- no memory leak (opposed to Sheng Peng's implementation)
- easier to work with (compared to original DESY implementation)
- supports SNMP writes (compared to Sheng's)
- depends more heavily on libsnmp (compared to Diamond's implementation)

Nowadays, Sheng Peng's implementation seems not to be developed anymore,
as well as Diamond's. From all forks, NSCL/FRIB and SLAC are still
around [2]. Between the two, slac-epics/snmp has been preferred over
NSCL/FRIB module [3] (also forked in slac-epics/epics-snmp [4]) to be
used here due to:

- more record types being supported by the device support, including
  mbbo [5, 6], which is interesting for our IOCs;
- its simpler repository structure and configuration, which can be
  easily integrated in our build system.

Changing from one implementation to the other is a matter of changing
the record DTYP used and restricting to the subset of supported record
types. Beyond that, record API is the same. Therefore, changing the
implementation in the future does have costs, but it should not be very
high.

Co-authored-by: Henrique F. Simoes <[email protected]>

[1]: https://epics.anl.gov/tech-talk/2013/msg00537.php
[2]: https://epics.anl.gov/tech-talk/2024/msg00889.php
[3]: https://groups.nscl.msu.edu/controls/files/devSnmp.html
[4]: https://github.com/slac-epics/epics-snmp
[5]: https://github.com/slac-epics/snmp/blob/134fbfd91ac83974730093330781cd1217017382/devSnmpApp/src/devSnmp.dbd
[6]: https://github.com/slac-epics/epics-snmp/blob/12a9cfa7b5b07bee17ae8ba7a74b460dd72811e6/snmpApp/src/devSnmp.dbd
  • Loading branch information
guirodrigueslima committed Jul 30, 2024
1 parent 6291836 commit 2ea1897
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions base/.env
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ETHER_IP_VERSION=ether_ip-3-3
IOCSTATS_VERSION=3.2.0
IPMICOMM_VERSION=R4.6.0
PYDEVSUP_VERSION=1.2
SNMP_VERSION=1.1.0.4

AREA_DETECTOR_VERSION=R3-12-1
NDSSCPIMEGA_VERSION=1.0.0
Expand Down
2 changes: 2 additions & 0 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN apt update -y && \
libtiff-dev \
libusb-1.0-0-dev \
libxml2-dev \
libsnmp-dev \
libssl-dev \
re2c \
unzip \
Expand Down Expand Up @@ -58,6 +59,7 @@ ARG ETHER_IP_VERSION
ARG IOCSTATS_VERSION
ARG IPMICOMM_VERSION
ARG PYDEVSUP_VERSION
ARG SNMP_VERSION

COPY ipmicomm.patch .
COPY caputlog-waveform-fix.patch .
Expand Down
1 change: 1 addition & 0 deletions base/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ services:
IOCSTATS_VERSION: ${IOCSTATS_VERSION}
IPMICOMM_VERSION: ${IPMICOMM_VERSION}
PYDEVSUP_VERSION: ${PYDEVSUP_VERSION}
SNMP_VERSION: ${SNMP_VERSION}
AREA_DETECTOR_VERSION: ${AREA_DETECTOR_VERSION}
NDSSCPIMEGA_VERSION: ${NDSSCPIMEGA_VERSION}
LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION}
Expand Down
6 changes: 6 additions & 0 deletions base/install_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ echo PYTHON=python3 >> pyDevSup/configure/CONFIG_SITE
install_module pyDevSup PYDEVSUP "
EPICS_BASE
"

lnls-get-n-unpack -l https://groups.nscl.msu.edu/controls/files/epics-snmp-$SNMP_VERSION.zip
mv epics-snmp-$SNMP_VERSION snmp
install_module -i snmp SNMP "
EPICS_BASE
"
2 changes: 2 additions & 0 deletions base/musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ RUN apk add --no-cache \
make \
musl-dev \
ncurses-terminfo \
net-snmp-dev \
patch \
perl \
rpcsvc-proto \
Expand Down Expand Up @@ -57,6 +58,7 @@ ARG ETHER_IP_VERSION
ARG IOCSTATS_VERSION
ARG IPMICOMM_VERSION
ARG PYDEVSUP_VERSION
ARG SNMP_VERSION

WORKDIR ${EPICS_MODULES_PATH}
COPY ipmicomm.patch .
Expand Down
1 change: 1 addition & 0 deletions base/musl/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ services:
IOCSTATS_VERSION: ${IOCSTATS_VERSION}
IPMICOMM_VERSION: ${IPMICOMM_VERSION}
PYDEVSUP_VERSION: ${PYDEVSUP_VERSION}
SNMP_VERSION: ${SNMP_VERSION}

0 comments on commit 2ea1897

Please sign in to comment.