##### <font color = "#1D8571">Теплосервер</font>
```bash
/usr/uaserver/ -> uateploserver
```
##### <font color = "#1D8571">После запуска в логах посмотреть порт:</font>
```bash
Server opened endpoints for following URLs:
	opc.tcp://a02:4841
```
##### <font color = "#1D8571">В настройках клиента UA Expert прописать адрес сервера и протокол:</font>
```bash
opc.tcp://192.168.24.35:4841
```
##### <font color = "#1D8571">Добавить сетевой интерфейс:</font>
```bash
sudo ifconfig eno1:1 192.168.24.30
```
##### <font color = "#1D8571">Запуск Docker, сборка event_monitor, teploserver</font>
```bash
sudo docker run \
-v $(pwd):/home/jenkins/workspace/BlueLake \
-v /home/dtelenkov/projects/gas/Silverstone:/home/jenkins/workspace/Silverstone \
-v /home/dtelenkov/projects/gas/BL_packages:/home/packages/BL_packages \
--privileged=true -it 192.168.24.227:8082/docker/bluelake-buildenv:jessie-v2-cc /bin/bash
```
##### <font color = "#1D8571">Сборка buildroot (предварительно запустить docker):</font>
```bash
make defconfig_BlueLake_Arbiter

cp -s /home/packages/BL_packages/buildroot/* ./buildroot/buildroot-2011.08/dl/

make brclean - Опционально

make
```
##### <font color = "#1D8571">Сборка тепло-сервера:</font>
```bach
cd workspace/BlueLake
```

```bash
rm -fr ./buildroot/buildroot-2011.08/swc/packages/uateploserver/; cp -r ./buildroot/BlueLake/swc/packages/uateploserver/ ./buildroot/buildroot-2011.08/swc/packages/uateploserver; rm -rf ./buildroot/buildroot-2011.08/output/build/uateploserver-1.0/; make
```
Путь к собранному исполняемому файлу:
```bash
/home/jenkins/workspace/BlueLake/buildroot/buildroot-2011.08/output/build/uateploserver-1.0/applications
```
Скопировать в /tmp Арбитра:
```bash
scp /home/dtelenkov/projects/gas/BlueLake-Arbiter-Gas-ASUTP-dev/buildroot/buildroot-2011.08/output/build/uateploserver-1.0/applications/uateploserver hidden@192.168.24.35:/tmp
```
Далее в Арбитре
```bash
cp /tmp/uateploserver /usr/uaserver/
```
##### <font color = "#1D8571">Сборка event_monitor2:</font>
```bash
rm -rf ./buildroot/buildroot-2011.08/fs/swc/configs/; cp -r ./buildroot/BlueLake/fs/swc/configs ./buildroot/buildroot-2011.08/fs/swc/; rm -rf ./buildroot/buildroot-2011.08/swc/packages/event_monitor2/; cp -r ./buildroot/BlueLake/swc/packages/event_monitor2 ./buildroot/buildroot-2011.08/swc/packages/; rm -rf ./buildroot/buildroot-2011.08/output/build/event_monitor2-3.0/; make
```
Путь к файлам pyc:
```bash
/home/jenkins/workspace/BlueLake/buildroot/buildroot-2011.08/output/build/event_monitor2-3.0/event_monitor
```
Скопировать во временную папку:
```bash
cp /home/dtelenkov/projects/gas/BlueLake-Arbiter-Gas-ASUTP-dev/buildroot/buildroot-2011.08/output/build/event_monitor2-3.0/services/teplo/teplo_api_controller.pyc /home/dtelenkov/projects/gas/new/my_pyc/
```
Скопировать в /tmp Арбитра:
```
scp /home/dtelenkov/projects/gas/new/my_pyc/teplo_api_controller.pyc hidden@192.168.24.35:/tmp
```
Далее на Арбитре:
```bash
cp -i /tmp/teplo_api_controller.pyc /usr/local/event_monitor2/services/teplo
```
##### <font color = "#1D8571">Работа с event_monitor2</font>
```bash
/etc/init.d/watchdog_pause start
/etc/init.d/S80event_monitor.sh stop

Обновить нужные pyc-файлы
/usr/local/event_monitor2/services/teplo

/etc/init.d/S80event_monitor.sh start
```
##### <font color = "#1D8571">web контроллера:</font>
```bash
/usr/local/web_ui
```
##### <font color = "#1D8571">Сборка "pyc" файлов:</font>
```bash
python -m compileall <file_1>.py <file_n>.pyc
```
##### <font color = "#1D8571">Загрузка конфигурации:</font>
```python
class ConfigReservedStorage(ConfigFileStorage):
	FILE_PATH = "/mnt/config/reserved_config.tar"

class ConfigStartupStorage(ConfigFileStorage):
	FILE_PATH = "/mnt/config/startup_config.tar"

class ConfigStorageDefault(ConfigFileStorage):
	FILE_PATH = "/home/em/default_config.tar"
```
Первая попытка загрузки - Startup

Работа с JSON RPS:
```bash
/usr/local/event_monitor2/services/teplo

$ cp teplo_api_base.pyc /usr/local/event_monitor2/services/teplo

$ chmod 777 /usr/local/event_monitor2/services/teplo/teplo_api_base.pyc
```

GUISController:

Добавление параметров.
1. teplo_giuscontrollertypebase.h
```c++
class Teplo_EXPORT GIUSControllerTypeBase:public OpcUa::BaseObjectType
```
2. teplo_giuscontrollertype.cpp
```c++
m_pNewParam->setDescription(UaLocalizedText("ru", "Новый тестовый параметр"));

this->add_string_var (m_pNewParam, "NewParam");
```
3. teplo_guiscontrollertypebase.cpp
```c++
m_pNewParam = new OpcUa::PropertyType(this, s_pNewParam, m_pNodeConfig, m_pSharedMutex);

addStatus = m_pNodeConfig->addNodeAndReference(this, m_pNewParam, OpcUaId_HasProperty);

UA_ASSERT(addStatus.isGood());
```
##### <font color = "#1D8571">Цифровые входы</font>
1. teplo_intsensorsbase.h
Добавил:
```c++
virtual void setDI1(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI1() const;

virtual void setDI2(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI2() const;

virtual void setDI3(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI3() const;

virtual void setDI4(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI4() const;

virtual void setDI5(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI5() const;

virtual void setDI6(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI6() const;

virtual void setDI7(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI7() const;

virtual void setDI8(OpcUa_Byte DI1);
virtual OpcUa_Byte getDI8() const;

protected:
	// Variable DI1
	static Teplo::ExAnalogItemType* s_pDI1;
	Teplo::ExAnalogItemType* m_pDI1;
	// Variable DI2
	static Teplo::ExAnalogItemType* s_pDI2;
	Teplo::ExAnalogItemType* m_pDI2;
	// Variable DI3
	static Teplo::ExAnalogItemType* s_pDI3;
	Teplo::ExAnalogItemType* m_pDI3;
	// Variable DI4
	static Teplo::ExAnalogItemType* s_pDI4;
	Teplo::ExAnalogItemType* m_pDI4;
	// Variable DI5
	static Teplo::ExAnalogItemType* s_pDI5;
	Teplo::ExAnalogItemType* m_pDI5;
	// Variable DI6
	static Teplo::ExAnalogItemType* s_pDI6;
	Teplo::ExAnalogItemType* m_pDI6;
	// Variable DI7
	static Teplo::ExAnalogItemType* s_pDI7;
	Teplo::ExAnalogItemType* m_pDI7;
	// Variable DI8
	static Teplo::ExAnalogItemType* s_pDI8;
	Teplo::ExAnalogItemType* m_pDI8;
```
2. teplo_intsensorsbase.cpp
3. teplo_identifiers.h
```c++

```