# License of this conf-file: GPL3+
# This is a sample configuation file for solarpowerlog.
#
# For syntax: The file is parsed by libconfig.

# This example file shows how to enable the "internal" Sputnik simulator.
# Note that the logger section can be empty, but must be present.

# NOTE: For instructions how to use the simulator, please read
# tools/sputnik_simulator/README

application:
{
# what debuglevel should be used if not specified by any component
# Choose out of ALL, TRACE, DEBUG, INFO, WARN, ERROR ,FATAL and NONE
# optional. If not given, it defaults to "ERROR"
# Note, if specified a logconfig file, the config file can override this
# setting.
dbglevel = "DEBUG"

# configuration file to load for liblog4cxx
# see the liblog4cxx docs for details.
# (http://http://logging.apache.org/log4cxx/index.html)
# With the configuration file you can specify different log files for
# different components of the program.
# note, that if not given it will log everything to the console.
# note: if the filename ends with .xml, libconfig tries to load the
# configuration in xml-format, which allows even more tweaks.
#logconfig = "solarpowerlog_lib4cxx.conf";
#logconfig = "solarpowerlog_lib4cxx.xml";
};

inverter :
{
inverters = (
    {
    # (REQUIRED) Name of the Inverter (Will be used as reference in the program)
    name   = "Simulator";

    # (REQUIRED) "Human Readable Description of the fine piece of
    # hardware. Not interpreted by this software"
    # description = "Sputnik Simulator";

    # (REQUIRED) Selects the family of the inverters.
    # (In SW-Speak: Specifies the family of factory to generate. The
    # generated factory will instanciate the correct model class
    # specified by "model"
    manufactor =  "SPUTNIK_ENGINEERING";

    # (REQUIRED) Which model we about to talk too
    # Your choice is at the moment "S-Series" or "Simulator".
    # (To obtain the list of choice, comment this line and run solarpowerlog
    # --  it    will tell you the valid options.)
    model ="Simulator";

    # (optional) TYP defines the model identifie used by Sputnik Engineering to identfy
    # their modules.
    # The default value is, 65534 (0xFFFE) is not defined by Sputnik Engineering
    # but helps to identify that the simulator has been used in e.g. log files.
    # See the CSputnikCommandTYP.cpp for (known) values.
    # some examples
    # note that you can also set this value at runtimne via the ctrl server.
    # type there TYP=<type>, for example TYP=2001
    #TYP=2001; #"SolarMax 2000 E"
    #TYP=2010; #"SolarMax 2000 C"
    #TYP=20010; #"SolarMax 2000 S"
    #TYP=20030; #"SolarMax 4200 S"

    # (REQUIRED BY SPUTNIK, S-Series)
    # mode of communication
    comms = "TCP/IP";

    # Sets the communication for TCP/IP to "incoming connections", required
    # by the simulator.
    tcpmode = "server";

    # TCP/IP options. Address and Port.
    # In the simulator mode, tcpadr can be used to specify the interface we
    # will listen on -- by specifing the ip-address in dotted notation.
    # Default is to listen to any IP-V4 interface. (same as saying
    # tcpadr="any")
    # Theoretically, "any_v6" specifies IP-V6 interfaces, but the Sputnik
    # Inverters do not support this.
    # Example: the next commented line should limit connections to localhost.
    # tcpadr =  "127.0.0.1";

    # Specifies the port to listen on.
    # note that in contrast to the inverter class, the simulator needs an
    # number here. Well-known-services (via strings) are not possible.
    tcpport = 12345;

    # Communication address of the simulator
    commadr = 1;

    # Control server.
    ctrl_comms = {
    comms = "TCP/IP";
    tcpmode = "server";
    tcpadr = "127.0.0.1";
    tcpport = 12346;
    };

    }
);
};


logger:
{
    loggers = ();
};
