# Начало

[![image.png](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/scaled-1680-/Rlyimage.png)](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/Rlyimage.png)

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Блок “Начало” запускает работу сценария и принимает данные, необходимые для выполнения сценария. Это обязательный блок в сценарии наравне с блоком "Конец".</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[![image.png](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/scaled-1680-/oIRimage.png)](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/oIRimage.png)  
**Название блока** - впишите любое название блока, чтобы отличать его от других блоков в рабочем пространстве. Например, "Начало сценария Умного Шлагбаума"</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[![image.png](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/scaled-1680-/5BOimage.png)](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/5BOimage.png)</span>

**<span style="font-size: 11pt; font-family: Arial, sans-serif; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Типы стартовых блоков:</span>**

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Входящее изображение: используется для обработки сценариев основанных на получении изображения </span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #ff0000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Входящий видеопоток</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #ff0000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Запрос к видеопотоку </span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #ff0000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Завершающий сценарий</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[![image.png](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/scaled-1680-/XfQimage.png)](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/XfQimage.png)  
**Дополнительные параметры** - параметры необходимые для выполнения сценария  
  
</span>

[![image.png](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/scaled-1680-/WAWimage.png)](https://docs.platform-vision.is74.ru/uploads/images/gallery/2024-05/WAWimage.png)

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Для большинства сценариев имеет смысл добавить в стартовый блок следующие переменные, поэтому они по умолчанию добавлены в блок "Начало", автоматически создаваемый в новом сценарии:</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**time** - хранит время получения события</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**source** - хранит источник получения события</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**img\_key** - хранит уникальный идентификатор изображения</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**camera\_id** - хранит уникальный идентификатор камеры</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**img\_bytes** - хранит изображение </span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**camera\_name** - хранит название камеры присвоенное при ее добавлении  
</span><span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">**scenario\_id**  - хранит уникальный идентификатор сценария</span>

<span style="font-size: 11pt; font-family: Arial,sans-serif; color: #000000; background-color: transparent; font-weight: 400; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">  
</span>