Chapter 1. SCR Agents

For each category of system data there is a corresponding SCR-agent. Their job is to map the real system data to YCP-data structures so that YCP-modules can access them in a convenient way. In fact the SCR-agents provide the YCP data structures. They come into existence with the presence of an SCR-agent that provides them. Otherwise they wouldn't be there.

For example there is an agent that reads and writes the /etc/sysconfig files. The YCP-representation of a sysconfig-variable is a single YCP-string. When reading, the agent reads the variable in the corresponding file and creates a YCP-string from it. When writing, the agent gets the new value as YCP-string and changes the variable in the corresponding file accordingly.

It must be said here, that the set of agents may change over time. New agents may be created in the future and other ones might be abandoned if their functionality is obsolete or taken over by another agent. Generally this is no problem because for module development it is not (and should not be) necessary to know exactly which agent does what. As already said, the SCR provides an abstraction of the data to be handled and this abstraction comes into being in form of a tree, the SCR-tree.