Cheatsheet¶
You can download the cheatsheet in PDF format here:
cheatsheet.pdf
See the Pre-requisites and the Setting up the flake registry guide before getting started.
IOCs¶
For an introduction into IOC development, read Creating a StreamDevice IOC.
IOC creation¶
nix flake new -t epnix myTop
|
Create an EPNix EPICS top |
makeBaseApp.pl -t ioc name
|
Initialize an EPICS app in an EPICS top |
makeBaseApp.pl -a linux-x86_64 -i -t ioc -p name Name
|
Initialize an |
IOC development¶
propagatedBuildInputs = [
epnix.support.StreamDevice
];
|
In |
nativeBuildInputs = [myLib];
buildInputs = [myLib];
|
In |
myApp_DBD = stream.dbd
myApp_LIBS = stream
|
In |
Important files¶
See Template files for more detailed information.
|
Nix project file |
|
Defines the EPICS top build |
|
Defines the |
IOC building¶
nix build -L
|
Build the IOC, showing compilation logs |
nix develop
|
Enter the development shell |
epicsConfigurePhase
|
In the development shell, configure the EPICS build |
make
|
In the development shell, manually build the EPICS top |
Flake input overrides¶
nix build -L \
--override-input \
supportModule \
/path/to/supportModule
|
Build the IOC, but with a custom version of a support module |
nix develop \
--override-input \
supportModule \
/path/to/supportModule
|
Enter the development shell, but with a custom version of a support module |
IOC testing¶
nix flake check -L
|
Run IOC checks |
IOC testing tutorial documentation |
|
IOC testing guides |
IOC inspection¶
For IOCs deployed on NixOS system by using the IOC services options.
systemctl status myIoc
|
Check whether an IOC is running |
systemctl restart myIoc
|
Restart an IOC |
systemctl stop myIoc
|
Stop an IOC |
journalctl -xefu myIoc
|
Follow the logs of an IOC |
telnet-myIoc
|
Connect to the command-line of an IOC |
NixOS services¶
For an introduction into how to deploy EPICS-related services, read the Creating an Archiver Appliance instance tutorial.
Applying NixOS changes¶
nixos-rebuild test
|
Apply changes now, but revert them on reboot |
nixos-rebuild switch
|
Apply changes now, and keep them on reboot |
nixos-rebuild boot
|
Apply changes for the next reboot |