1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-03-19 21:17:55 +02:00

Main build (Jenkins)

This commit is contained in:
Vitaly the Alpaca (bot) 2024-12-17 14:53:37 +03:00
parent 1b11e0d00a
commit 737b33ba83
22 changed files with 6128 additions and 5894 deletions

View File

@ -0,0 +1,3 @@
{
"Address": "45.79.112.203:4242"
}

View File

@ -0,0 +1,3 @@
{
"Address": "45.79.112.203:4242"
}

View File

@ -0,0 +1,12 @@
 Address = "45.79.112.203:4242";
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
OPI_TCP.SendLine(Connection, Data);
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadLine(Connection, , Marker);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OPI_TCP.CloseConnection(Connection);

View File

@ -3,11 +3,11 @@
Message = "Hello server!" + Chars.LF;
Data = ПолучитьДвоичныеДанныеИзСтроки(Message);
OPI_TCP.SendBinaryData(Connection, Data);
Result = OPI_TCP.SendBinaryData(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadBinaryData(Connection, , Marker);
Response = OPI_TCP.ReadBinaryData(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);

View File

@ -0,0 +1,12 @@
 Address = "45.79.112.203:4242";
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
Result = OPI_TCP.SendLine(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Response = OPI_TCP.ReadLine(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);

View File

@ -38,7 +38,18 @@ Parameters with Binary data type can also accept file paths on disk and URLs
```bsl title="1C:Enterprise/OneScript code example"
Address = "45.79.112.203:4242";
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
OPI_TCP.SendLine(Connection, Data);
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadLine(Connection, , Marker);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OPI_TCP.CloseConnection(Connection);
```

View File

@ -40,12 +40,12 @@ Parameters with Binary data type can also accept file paths on disk and URLs
Message = "Hello server!" + Chars.LF;
Data = ПолучитьДвоичныеДанныеИзСтроки(Message);
OPI_TCP.SendBinaryData(Connection, Data);
Result = OPI_TCP.SendBinaryData(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadBinaryData(Connection, , Marker);
Response = OPI_TCP.ReadBinaryData(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);
```

View File

@ -33,7 +33,18 @@ import TabItem from '@theme/TabItem';
```bsl title="1C:Enterprise/OneScript code example"
Address = "45.79.112.203:4242";
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
Result = OPI_TCP.SendLine(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Response = OPI_TCP.ReadLine(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);
```

View File

@ -0,0 +1,3 @@
{
"Адрес": "45.79.112.203:4242"
}

View File

@ -0,0 +1,3 @@
{
"Адрес": "45.79.112.203:4242"
}

View File

@ -3,11 +3,11 @@
Сообщение = "Hello server!" + Символы.ПС;
Данные = ПолучитьДвоичныеДанныеИзСтроки(Сообщение);
OPI_TCP.ОтправитьДвоичныеДанные(Соединение, Данные);
Результат = OPI_TCP.ОтправитьДвоичныеДанные(Соединение, Данные);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Маркер конца сообщения для исключения ожидания конца таймаута
Маркер = Символы.ПС;
Результат = OPI_TCP.ПрочитатьДвоичныеДанные(Соединение, , Маркер);
Маркер = Символы.ПС;
Ответ = OPI_TCP.ПрочитатьДвоичныеДанные(Соединение, , Маркер);
OPI_TCP.ЗакрытьСоединение(Соединение);

View File

@ -0,0 +1,12 @@
 Адрес = "45.79.112.203:4242";
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
Результат = OPI_TCP.ОтправитьСтроку(Соединение, Данные);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Маркер конца сообщения для исключения ожидания конца таймаута
Маркер = Символы.ПС;
Ответ = OPI_TCP.ПрочитатьСтроку(Соединение, , Маркер);
OPI_TCP.ЗакрытьСоединение(Соединение);

View File

@ -0,0 +1,12 @@
 Адрес = "45.79.112.203:4242";
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
OPI_TCP.ОтправитьСтроку(Соединение, Данные);
// Маркер конца сообщения для исключения ожидания конца таймаута
Маркер = Символы.ПС;
Результат = OPI_TCP.ПрочитатьСтроку(Соединение, , Маркер);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OPI_TCP.ЗакрытьСоединение(Соединение);

View File

@ -38,7 +38,18 @@ import TabItem from '@theme/TabItem';
```bsl title="Пример использования для 1С:Предприятие/OneScript"
Адрес = "45.79.112.203:4242";
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
OPI_TCP.ОтправитьСтроку(Соединение, Данные);
// Маркер конца сообщения для исключения ожидания конца таймаута
Маркер = Символы.ПС;
Результат = OPI_TCP.ПрочитатьСтроку(Соединение, , Маркер);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OPI_TCP.ЗакрытьСоединение(Соединение);
```

View File

@ -40,12 +40,12 @@ import TabItem from '@theme/TabItem';
Сообщение = "Hello server!" + Символы.ПС;
Данные = ПолучитьДвоичныеДанныеИзСтроки(Сообщение);
OPI_TCP.ОтправитьДвоичныеДанные(Соединение, Данные);
Результат = OPI_TCP.ОтправитьДвоичныеДанные(Соединение, Данные);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Маркер конца сообщения для исключения ожидания конца таймаута
Маркер = Символы.ПС;
Результат = OPI_TCP.ПрочитатьДвоичныеДанные(Соединение, , Маркер);
Маркер = Символы.ПС;
Ответ = OPI_TCP.ПрочитатьДвоичныеДанные(Соединение, , Маркер);
OPI_TCP.ЗакрытьСоединение(Соединение);
```

View File

@ -33,7 +33,18 @@ import TabItem from '@theme/TabItem';
```bsl title="Пример использования для 1С:Предприятие/OneScript"
Адрес = "45.79.112.203:4242";
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
Результат = OPI_TCP.ОтправитьСтроку(Соединение, Данные);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Маркер конца сообщения для исключения ожидания конца таймаута
Маркер = Символы.ПС;
Ответ = OPI_TCP.ПрочитатьСтроку(Соединение, , Маркер);
OPI_TCP.ЗакрытьСоединение(Соединение);
```

File diff suppressed because it is too large Load Diff

View File

@ -2183,6 +2183,8 @@ Procedure TC_Client() Export
TCP_CloseConnection(TestParameters);
TCP_ReadBinaryData(TestParameters);
TCP_SendBinaryData(TestParameters);
TCP_ReadLine(TestParameters);
TCP_SendLine(TestParameters);
TCP_ProcessRequest(TestParameters);
EndProcedure
@ -15732,7 +15734,6 @@ Procedure TCP_ReadBinaryData(FunctionParameters) Export
OPI_TestDataRetrieval.WriteLog(Result, "ReadBinaryData (timeout)", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Message);
EndProcedure
Procedure TCP_SendBinaryData(FunctionParameters) Export
@ -15742,20 +15743,20 @@ Procedure TCP_SendBinaryData(FunctionParameters) Export
Message = "Hello server!" + Chars.LF;
Data = ПолучитьДвоичныеДанныеИзСтроки(Message);
OPI_TCP.SendBinaryData(Connection, Data);
Result = OPI_TCP.SendBinaryData(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadBinaryData(Connection, , Marker);
Response = OPI_TCP.ReadBinaryData(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);
// END
Result = ПолучитьСтрокуИзДвоичныхДанных(Result);
Response = ПолучитьСтрокуИзДвоичныхДанных(Response);
OPI_TestDataRetrieval.WriteLog(Result, "SendBinaryData", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Message);
OPI_TestDataRetrieval.Check_String(Response, Message);
Connection = OPI_TCP.CreateConnection(Address);
@ -15785,6 +15786,70 @@ Procedure TCP_ProcessRequest(FunctionParameters) Export
EndProcedure
Procedure TCP_ReadLine(FunctionParameters) Export
Address = FunctionParameters["TCP_Address"];
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
OPI_TCP.SendLine(Connection, Data);
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadLine(Connection, , Marker);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OPI_TCP.CloseConnection(Connection);
// END
OPI_TestDataRetrieval.WriteLog(Result, "ReadLine", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Data);
Connection = OPI_TCP.CreateConnection(Address);
OPI_TCP.SendLine(Connection, Data);
Result = OPI_TCP.ReadLine(Connection, , , 50000);
OPI_TCP.CloseConnection(Connection);
OPI_TestDataRetrieval.WriteLog(Result, "ReadLine (timeout)", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Data);
EndProcedure
Procedure TCP_SendLine(FunctionParameters) Export
Address = FunctionParameters["TCP_Address"];
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
Result = OPI_TCP.SendLine(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Response = OPI_TCP.ReadLine(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);
// END
OPI_TestDataRetrieval.WriteLog(Result, "SendLine", "TCP");
OPI_TestDataRetrieval.Check_String(Response, Data);
Connection = OPI_TCP.CreateConnection(Address);
OPI_TCP.SendLine(Connection, Data);
Result = OPI_TCP.ReadLine(Connection, , , 50000);
OPI_TCP.CloseConnection(Connection);
OPI_TestDataRetrieval.WriteLog(Result, "SendLine (timeout)", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Data);
EndProcedure
#EndRegion
#EndRegion

View File

@ -2183,6 +2183,8 @@ Procedure TC_Client() Export
TCP_CloseConnection(TestParameters);
TCP_ReadBinaryData(TestParameters);
TCP_SendBinaryData(TestParameters);
TCP_ReadLine(TestParameters);
TCP_SendLine(TestParameters);
TCP_ProcessRequest(TestParameters);
EndProcedure
@ -15732,7 +15734,6 @@ Procedure TCP_ReadBinaryData(FunctionParameters) Export
OPI_TestDataRetrieval.WriteLog(Result, "ReadBinaryData (timeout)", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Message);
EndProcedure
Procedure TCP_SendBinaryData(FunctionParameters) Export
@ -15742,20 +15743,20 @@ Procedure TCP_SendBinaryData(FunctionParameters) Export
Message = "Hello server!" + Chars.LF;
Data = GetBinaryDataFromString(Message);
OPI_TCP.SendBinaryData(Connection, Data);
Result = OPI_TCP.SendBinaryData(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadBinaryData(Connection, , Marker);
Response = OPI_TCP.ReadBinaryData(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);
// END
Result = GetStringFromBinaryData(Result);
Response = GetStringFromBinaryData(Response);
OPI_TestDataRetrieval.WriteLog(Result, "SendBinaryData", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Message);
OPI_TestDataRetrieval.Check_String(Response, Message);
Connection = OPI_TCP.CreateConnection(Address);
@ -15785,6 +15786,70 @@ Procedure TCP_ProcessRequest(FunctionParameters) Export
EndProcedure
Procedure TCP_ReadLine(FunctionParameters) Export
Address = FunctionParameters["TCP_Address"];
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
OPI_TCP.SendLine(Connection, Data);
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Result = OPI_TCP.ReadLine(Connection, , Marker);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OPI_TCP.CloseConnection(Connection);
// END
OPI_TestDataRetrieval.WriteLog(Result, "ReadLine", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Data);
Connection = OPI_TCP.CreateConnection(Address);
OPI_TCP.SendLine(Connection, Data);
Result = OPI_TCP.ReadLine(Connection, , , 50000);
OPI_TCP.CloseConnection(Connection);
OPI_TestDataRetrieval.WriteLog(Result, "ReadLine (timeout)", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Data);
EndProcedure
Procedure TCP_SendLine(FunctionParameters) Export
Address = FunctionParameters["TCP_Address"];
Connection = OPI_TCP.CreateConnection(Address);
Data = "Hello server!" + Chars.LF;
Result = OPI_TCP.SendLine(Connection, Data);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// End of message marker to avoid waiting for the end of timeout
Marker = Chars.LF;
Response = OPI_TCP.ReadLine(Connection, , Marker);
OPI_TCP.CloseConnection(Connection);
// END
OPI_TestDataRetrieval.WriteLog(Result, "SendLine", "TCP");
OPI_TestDataRetrieval.Check_String(Response, Data);
Connection = OPI_TCP.CreateConnection(Address);
OPI_TCP.SendLine(Connection, Data);
Result = OPI_TCP.ReadLine(Connection, , , 50000);
OPI_TCP.CloseConnection(Connection);
OPI_TestDataRetrieval.WriteLog(Result, "SendLine (timeout)", "TCP");
OPI_TestDataRetrieval.Check_String(Result, Data);
EndProcedure
#EndRegion
#EndRegion

View File

@ -15790,7 +15790,7 @@
Адрес = ПараметрыФункции["TCP_Address"];
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
Данные = "Hello server!" + Символы.ПС;
OPI_TCP.ОтправитьСтроку(Соединение, Данные);
@ -15822,7 +15822,7 @@
Адрес = ПараметрыФункции["TCP_Address"];
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
Данные = "Hello server!" + Символы.ПС;
Результат = OPI_TCP.ОтправитьСтроку(Соединение, Данные);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -2060,9 +2060,9 @@
КонецФункции
Функция ПолучитьОбщийМодуль(Знач Имя)
Модуль = Вычислить(Имя);
Возврат Модуль;
КонецФункции

View File

@ -15790,7 +15790,7 @@
Адрес = ПараметрыФункции["TCP_Address"];
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
Данные = "Hello server!" + Символы.ПС;
OPI_TCP.ОтправитьСтроку(Соединение, Данные);
@ -15822,7 +15822,7 @@
Адрес = ПараметрыФункции["TCP_Address"];
Соединение = OPI_TCP.ОткрытьСоединение(Адрес);
Данные = "Hello server!" + Символы.ПС;
Данные = "Hello server!" + Символы.ПС;
Результат = OPI_TCP.ОтправитьСтроку(Соединение, Данные);
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^