Compare commits
No commits in common. "master" and "master" have entirely different histories.
31
myapp.sln
31
myapp.sln
@ -1,31 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 17
|
|
||||||
VisualStudioVersion = 17.1.32210.238
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "myapp", "myapp\myapp.vcxproj", "{B6A80389-FB76-4FE6-B5E6-143D763033E0}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|x64 = Debug|x64
|
|
||||||
Debug|x86 = Debug|x86
|
|
||||||
Release|x64 = Release|x64
|
|
||||||
Release|x86 = Release|x86
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Debug|x64.ActiveCfg = Debug|x64
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Debug|x64.Build.0 = Debug|x64
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Debug|x86.ActiveCfg = Debug|Win32
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Debug|x86.Build.0 = Debug|Win32
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Release|x64.ActiveCfg = Release|x64
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Release|x64.Build.0 = Release|x64
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Release|x86.ActiveCfg = Release|Win32
|
|
||||||
{B6A80389-FB76-4FE6-B5E6-143D763033E0}.Release|x86.Build.0 = Release|Win32
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {8015EEC7-8AA9-4CF5-B6FC-3270ADB84058}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
293
myapp/myapp.c
293
myapp/myapp.c
@ -1,293 +0,0 @@
|
|||||||
//#define WIN32_LEAN_AND_MEAN
|
|
||||||
//
|
|
||||||
//#include <windows.h>
|
|
||||||
//#include <winsock2.h>
|
|
||||||
//#include <ws2tcpip.h>
|
|
||||||
//#include <stdlib.h>
|
|
||||||
//#include <stdio.h>
|
|
||||||
//
|
|
||||||
//// Need to link with Ws2_32.lib, Mswsock.lib, and Advapi32.lib
|
|
||||||
//#pragma comment (lib, "Ws2_32.lib")
|
|
||||||
//#pragma comment (lib, "Mswsock.lib")
|
|
||||||
//#pragma comment (lib, "AdvApi32.lib")
|
|
||||||
//
|
|
||||||
//#define DEFAULT_BUFLEN 512
|
|
||||||
//#define DEFAULT_PORT "27015"
|
|
||||||
//
|
|
||||||
//int __cdecl main(int argc, char** argv)
|
|
||||||
//{
|
|
||||||
// WSADATA wsaData;
|
|
||||||
// SOCKET ConnectSocket = INVALID_SOCKET;
|
|
||||||
// struct addrinfo* result = NULL,
|
|
||||||
// * ptr = NULL,
|
|
||||||
// hints;
|
|
||||||
// const char* sendbuf = "this is a test";
|
|
||||||
// char recvbuf[DEFAULT_BUFLEN];
|
|
||||||
// int iResult;
|
|
||||||
// int recvbuflen = DEFAULT_BUFLEN;
|
|
||||||
//
|
|
||||||
// // Validate the parameters
|
|
||||||
// if (argc != 2) {
|
|
||||||
// printf("usage: %s server-name\n", argv[0]);
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Initialize Winsock
|
|
||||||
// iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
|
|
||||||
// if (iResult != 0) {
|
|
||||||
// printf("WSAStartup failed with error: %d\n", iResult);
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// ZeroMemory(&hints, sizeof(hints));
|
|
||||||
// hints.ai_family = AF_UNSPEC;
|
|
||||||
// hints.ai_socktype = SOCK_STREAM;
|
|
||||||
// hints.ai_protocol = IPPROTO_TCP;
|
|
||||||
//
|
|
||||||
// // Resolve the server address and port
|
|
||||||
// iResult = getaddrinfo(argv[1], DEFAULT_PORT, &hints, &result);
|
|
||||||
// if (iResult != 0) {
|
|
||||||
// printf("getaddrinfo failed with error: %d\n", iResult);
|
|
||||||
// WSACleanup();
|
|
||||||
//
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Attempt to connect to an address until one succeeds
|
|
||||||
// for (ptr = result; ptr != NULL; ptr = ptr->ai_next) {
|
|
||||||
//
|
|
||||||
// // Create a SOCKET for connecting to server
|
|
||||||
// ConnectSocket = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
|
|
||||||
//
|
|
||||||
// if (ConnectSocket == INVALID_SOCKET) {
|
|
||||||
// printf("socket failed with error: %ld\n", WSAGetLastError());
|
|
||||||
// WSACleanup();
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Connect to server.
|
|
||||||
// iResult = connect(ConnectSocket, ptr->ai_addr, (int)ptr->ai_addrlen);
|
|
||||||
//
|
|
||||||
// if (iResult == SOCKET_ERROR) {
|
|
||||||
// closesocket(ConnectSocket);
|
|
||||||
// ConnectSocket = INVALID_SOCKET;
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// freeaddrinfo(result);
|
|
||||||
//
|
|
||||||
// if (ConnectSocket == INVALID_SOCKET) {
|
|
||||||
// printf("Unable to connect to server!\n");
|
|
||||||
// WSACleanup();
|
|
||||||
//
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Send an initial buffer
|
|
||||||
// iResult = send(ConnectSocket, sendbuf, (int)strlen(sendbuf), 0);
|
|
||||||
// if (iResult == SOCKET_ERROR) {
|
|
||||||
// printf("send failed with error: %d\n", WSAGetLastError());
|
|
||||||
// closesocket(ConnectSocket);
|
|
||||||
// WSACleanup();
|
|
||||||
//
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// printf("Bytes Sent: %ld\n", iResult);
|
|
||||||
//
|
|
||||||
// // shutdown the connection since no more data will be sent
|
|
||||||
// iResult = shutdown(ConnectSocket, SD_SEND);
|
|
||||||
// if (iResult == SOCKET_ERROR) {
|
|
||||||
// printf("shutdown failed with error: %d\n", WSAGetLastError());
|
|
||||||
// closesocket(ConnectSocket);
|
|
||||||
// WSACleanup();
|
|
||||||
//
|
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // Receive until the peer closes the connection
|
|
||||||
// do {
|
|
||||||
// iResult = recv(ConnectSocket, recvbuf, recvbuflen, 0);
|
|
||||||
//
|
|
||||||
// if (iResult > 0)
|
|
||||||
// printf("Bytes received: %d\n", iResult);
|
|
||||||
// else if (iResult == 0)
|
|
||||||
// printf("Connection closed\n");
|
|
||||||
// else
|
|
||||||
// printf("recv failed with error: %d\n", WSAGetLastError());
|
|
||||||
//
|
|
||||||
// } while (iResult > 0);
|
|
||||||
//
|
|
||||||
// // cleanup
|
|
||||||
// closesocket(ConnectSocket);
|
|
||||||
// WSACleanup();
|
|
||||||
//
|
|
||||||
// return 0;
|
|
||||||
//}
|
|
||||||
|
|
||||||
#undef UNICODE
|
|
||||||
|
|
||||||
#define WIN32_LEAN_AND_MEAN
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock2.h>
|
|
||||||
#include <ws2tcpip.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
// Need to link with Ws2_32.lib
|
|
||||||
#pragma comment (lib, "Ws2_32.lib")
|
|
||||||
// #pragma comment (lib, "Mswsock.lib")
|
|
||||||
|
|
||||||
#define DEFAULT_BUFLEN 512
|
|
||||||
#define DEFAULT_PORT "27015"
|
|
||||||
|
|
||||||
int receiv(iResult, ClientSocket, recvbuf, recvbuflen) {
|
|
||||||
int iSendResult;
|
|
||||||
|
|
||||||
do {
|
|
||||||
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
|
|
||||||
|
|
||||||
if (iResult > 0) {
|
|
||||||
printf("Bytes received: %d\n", iResult);
|
|
||||||
|
|
||||||
// Echo the buffer back to the sender
|
|
||||||
iSendResult = send(ClientSocket, recvbuf, iResult, 0);
|
|
||||||
if (iSendResult == SOCKET_ERROR) {
|
|
||||||
printf("send failed with error: %d\n", WSAGetLastError());
|
|
||||||
closesocket(ClientSocket);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
printf("Bytes sent: %d\n", iSendResult);
|
|
||||||
}
|
|
||||||
else if (iResult == 0)
|
|
||||||
printf("Connection closing...\n");
|
|
||||||
else {
|
|
||||||
printf("recv failed with error: %d\n", WSAGetLastError());
|
|
||||||
closesocket(ClientSocket);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
} while (iResult > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int __cdecl main(void)
|
|
||||||
{
|
|
||||||
WSADATA wsaData;
|
|
||||||
int iResult;
|
|
||||||
|
|
||||||
SOCKET ListenSocket = INVALID_SOCKET;
|
|
||||||
SOCKET ClientSocket = INVALID_SOCKET;
|
|
||||||
|
|
||||||
struct addrinfo* result = NULL;
|
|
||||||
struct addrinfo hints;
|
|
||||||
|
|
||||||
char recvbuf[DEFAULT_BUFLEN];
|
|
||||||
int recvbuflen = DEFAULT_BUFLEN;
|
|
||||||
|
|
||||||
// Initialize Winsock
|
|
||||||
iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
|
|
||||||
if (iResult != 0) {
|
|
||||||
printf("WSAStartup failed with error: %d\n", iResult);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ZeroMemory(&hints, sizeof(hints));
|
|
||||||
hints.ai_family = AF_INET;
|
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
|
||||||
hints.ai_protocol = IPPROTO_TCP;
|
|
||||||
hints.ai_flags = AI_PASSIVE;
|
|
||||||
|
|
||||||
// Resolve the server address and port
|
|
||||||
iResult = getaddrinfo(NULL, DEFAULT_PORT, &hints, &result);
|
|
||||||
if (iResult != 0) {
|
|
||||||
printf("getaddrinfo failed with error: %d\n", iResult);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create a SOCKET for the server to listen for client connections.
|
|
||||||
ListenSocket = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
|
|
||||||
if (ListenSocket == INVALID_SOCKET) {
|
|
||||||
printf("socket failed with error: %ld\n", WSAGetLastError());
|
|
||||||
freeaddrinfo(result);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Setup the TCP listening socket
|
|
||||||
iResult = bind(ListenSocket, result->ai_addr, (int)result->ai_addrlen);
|
|
||||||
if (iResult == SOCKET_ERROR) {
|
|
||||||
printf("bind failed with error: %d\n", WSAGetLastError());
|
|
||||||
freeaddrinfo(result);
|
|
||||||
closesocket(ListenSocket);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
freeaddrinfo(result);
|
|
||||||
|
|
||||||
iResult = listen(ListenSocket, SOMAXCONN);
|
|
||||||
if (iResult == SOCKET_ERROR) {
|
|
||||||
printf("listen failed with error: %d\n", WSAGetLastError());
|
|
||||||
closesocket(ListenSocket);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accept a client socket
|
|
||||||
|
|
||||||
ClientSocket = accept(ListenSocket, NULL, NULL);
|
|
||||||
|
|
||||||
HANDLE hThread;
|
|
||||||
DWORD threadID;
|
|
||||||
|
|
||||||
hThread = CreateThread(NULL,
|
|
||||||
0,
|
|
||||||
receiv(iResult, ClientSocket, recvbuf, recvbuflen),
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
&threadID);
|
|
||||||
|
|
||||||
if (ClientSocket == INVALID_SOCKET) {
|
|
||||||
printf("accept failed with error: %d\n", WSAGetLastError());
|
|
||||||
closesocket(ListenSocket);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// No longer need server socket
|
|
||||||
// closesocket(ListenSocket);
|
|
||||||
|
|
||||||
// Receive until the peer shuts down the connection
|
|
||||||
|
|
||||||
// shutdown the connection since we're done
|
|
||||||
iResult = shutdown(ClientSocket, SD_SEND);
|
|
||||||
if (iResult == SOCKET_ERROR) {
|
|
||||||
printf("shutdown failed with error: %d\n", WSAGetLastError());
|
|
||||||
closesocket(ClientSocket);
|
|
||||||
WSACleanup();
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// cleanup
|
|
||||||
closesocket(ClientSocket);
|
|
||||||
WSACleanup();
|
|
||||||
CloseHandle(hThread);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,147 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
|
||||||
<Configuration>Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Release|x64">
|
|
||||||
<Configuration>Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<VCProjectVersion>16.0</VCProjectVersion>
|
|
||||||
<Keyword>Win32Proj</Keyword>
|
|
||||||
<ProjectGuid>{b6a80389-fb76-4fe6-b5e6-143d763033e0}</ProjectGuid>
|
|
||||||
<RootNamespace>myapp</RootNamespace>
|
|
||||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>v143</PlatformToolset>
|
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="Shared">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LinkIncremental>true</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<LinkIncremental>false</LinkIncremental>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
||||||
<ClCompile>
|
|
||||||
<WarningLevel>Level3</WarningLevel>
|
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
||||||
<SDLCheck>true</SDLCheck>
|
|
||||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
||||||
<ConformanceMode>true</ConformanceMode>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<SubSystem>Console</SubSystem>
|
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
||||||
</Link>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="myapp.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Исходные файлы">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Файлы заголовков">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Файлы ресурсов">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="myapp.c">
|
|
||||||
<Filter>Исходные файлы</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
||||||
<LocalDebuggerCommandArguments>10.202.0.13</LocalDebuggerCommandArguments>
|
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project>
|
|
||||||
<ProjectOutputs>
|
|
||||||
<ProjectOutput>
|
|
||||||
<FullPath>C:\Users\class\Desktop\myapp\x64\Debug\myapp.exe</FullPath>
|
|
||||||
</ProjectOutput>
|
|
||||||
</ProjectOutputs>
|
|
||||||
<ContentFiles />
|
|
||||||
<SatelliteDlls />
|
|
||||||
<NonRecipeFileRefs />
|
|
||||||
</Project>
|
|
Binary file not shown.
@ -1,9 +0,0 @@
|
|||||||
myapp.c
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(152,45): warning C4047: функция: "char *" отличается по уровням косвенного обращения от "int"
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(152,38): warning C4024: recv: различные типы для формального и фактического параметров 2
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(158,53): warning C4047: функция: "const char *" отличается по уровням косвенного обращения от "int"
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(158,46): warning C4024: send: различные типы для формального и фактического параметров 2
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(259,59): warning C4047: функция: "LPTHREAD_START_ROUTINE" отличается по уровням косвенного обращения от "int"
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(259,15): warning C4024: CreateThread: различные типы для формального и фактического параметров 3
|
|
||||||
C:\Users\class\Desktop\myapp\myapp\myapp.c(179): warning C4715: receiv: значение возвращается не при всех путях выполнения
|
|
||||||
myapp.vcxproj -> C:\Users\class\Desktop\myapp\x64\Debug\myapp.exe
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.31.31103:TargetPlatformVersion=10.0.19041.0:
|
|
||||||
Debug|x64|C:\Users\class\Desktop\myapp\|
|
|
Binary file not shown.
Binary file not shown.
@ -1,31 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Welcome file</title>
|
|
||||||
<link rel="stylesheet" href="https://stackedit.io/style.css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="stackedit">
|
|
||||||
<div class="stackedit__html"><h1 id="считывание-данных">Считывание данных</h1>
|
|
||||||
<h3 id="значение-ножки">Значение ножки</h3>
|
|
||||||
<p id="pin">123</p>
|
|
||||||
<h3 id="потенциометр">Потенциометр</h3>
|
|
||||||
<p id="pot">123</p>
|
|
||||||
</div>
|
|
||||||
<script>
|
|
||||||
setInterval(() => {
|
|
||||||
Promise.all([
|
|
||||||
fetch('/pin').then((response) => response.json()),
|
|
||||||
fetch('/potonciometer').then((response) => response.json())
|
|
||||||
]).then(([pin, pot]) => {
|
|
||||||
document.getElementById('pin').innerHTML = pin + '\n'
|
|
||||||
document.getElementById('pot').innerHTML = pot;
|
|
||||||
})
|
|
||||||
}, 300);
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
@ -1,50 +0,0 @@
|
|||||||
const fs = require('fs');
|
|
||||||
const http = require('node:http');
|
|
||||||
const { SerialPort } = require('serialport')
|
|
||||||
const { ReadlineParser } = require('@serialport/parser-readline');
|
|
||||||
|
|
||||||
const port = new SerialPort({path: '/com9', baudRate: 9600});
|
|
||||||
|
|
||||||
var str = {};
|
|
||||||
let obj;
|
|
||||||
|
|
||||||
const parser = port.pipe(new ReadlineParser({ delimeter: '\r\n' }));
|
|
||||||
|
|
||||||
parser.on('data', (data) => {
|
|
||||||
if (str != data) {
|
|
||||||
console.log(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
str = data;
|
|
||||||
try {
|
|
||||||
obj = JSON.parse(data);
|
|
||||||
} catch (Exception) {
|
|
||||||
console.log(Exception);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const server = http.createServer((req, res) => {
|
|
||||||
if (req.url == '/') {
|
|
||||||
fs.readFile('index.html', (err, data) => {
|
|
||||||
if (err) {
|
|
||||||
res.writeHead(404, 'Not Found');
|
|
||||||
res.write("No file found");
|
|
||||||
res.end();
|
|
||||||
} else {
|
|
||||||
res.writeHead(200, {
|
|
||||||
'Content-Type': 'text/html'
|
|
||||||
});
|
|
||||||
res.write(data);
|
|
||||||
res.end();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if (req.url == '/pin') {
|
|
||||||
res.writeHead(200, {'Content-Type': 'application/json'});
|
|
||||||
res.end(obj?.firstElement.toString());
|
|
||||||
} else if (req.url == '/potonciometer') {
|
|
||||||
res.writeHead(200, {'Content-Type': 'application/json'});
|
|
||||||
res.end(obj?.potenciometer.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
server.listen(2048);
|
|
414
servo_motor/package-lock.json
generated
414
servo_motor/package-lock.json
generated
@ -1,414 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Новая папка",
|
|
||||||
"lockfileVersion": 2,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/parser-readline": "^11.0.0",
|
|
||||||
"serialport": "^11.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/binding-mock": {
|
|
||||||
"version": "10.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz",
|
|
||||||
"integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/bindings-interface": "^1.2.1",
|
|
||||||
"debug": "^4.3.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/bindings-cpp": {
|
|
||||||
"version": "11.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-11.0.1.tgz",
|
|
||||||
"integrity": "sha512-3I1mniVg3osYuIUXxU0jB5AHPsxWmErmc3JC3WfUSlfXsjWMHkHfFzbW9Scuv/z/6DLCJIDyltabRa2FoW2qsQ==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/bindings-interface": "1.2.2",
|
|
||||||
"@serialport/parser-readline": "10.5.0",
|
|
||||||
"debug": "4.3.4",
|
|
||||||
"node-addon-api": "6.1.0",
|
|
||||||
"node-gyp-build": "4.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/bindings-cpp/node_modules/@serialport/parser-delimiter": {
|
|
||||||
"version": "10.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.5.0.tgz",
|
|
||||||
"integrity": "sha512-/uR/yT3jmrcwnl2FJU/2ySvwgo5+XpksDUR4NF/nwTS5i3CcuKS+FKi/tLzy1k8F+rCx5JzpiK+koqPqOUWArA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/bindings-cpp/node_modules/@serialport/parser-readline": {
|
|
||||||
"version": "10.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.5.0.tgz",
|
|
||||||
"integrity": "sha512-0aXJknodcl94W9zSjvU+sLdXiyEG2rqjQmvBWZCr8wJZjWEtv3RgrnYiWq4i2OTOyC8C/oPK8ZjpBjQptRsoJQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/parser-delimiter": "10.5.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/bindings-interface": {
|
|
||||||
"version": "1.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.2.tgz",
|
|
||||||
"integrity": "sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA==",
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.22 || ^14.13 || >=16"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-byte-length": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-rExsdFKdzOIHOBqTwzxUF1A9nrluVIZKZOtvMq5i0Hc3euooGdmkx0VXYNRlI2rd6kJLTL2P+uIR+ZtCTRyT+w==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-cctalk": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-eN1MvEIFwI4GedWJhte6eWF+NZtrjchZbMf0CE6NV9TRzJI1KLnFf90ZOj/mhGuANojX4sqWfJKQXwN6E8VSHQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-delimiter": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-aZLJhlRTjSmEwllLG7S4J8s8ctRAS0cbvCpO87smLvl3e4BgzbVgF6Z6zaJd3Aji2uSiYgfedCdNc4L6W+1E2g==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-inter-byte-timeout": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-RLgqZC50IET6FtEIt6Oi0vdRsesSBWLNwB7ldzR9OzyXKgK0XHRzqKqbB0u5Q+tC5OScdWeiQ2AO6jooKUZtsw==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-packet-length": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-packet-length/-/parser-packet-length-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-6ZkOiaCooabpV/EM7ttSRbisbDWpGEf7Yxyr13t28LicYR43THRdjdMZcRnWxEM/jpwfskkLLXAR6wziVpKrlw==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.6.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-readline": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-rRAivhRkT3YO28WjmmG4FQX6L+KMb5/ikhyylRfzWPw0nSXy97+u07peS9CbHqaNvJkMhH1locp2H36aGMOEIA==",
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/parser-delimiter": "11.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-ready": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-lSsCPIctoc5kADCKnZDYBz1j69TsFqtnaWUicBzUAIAoUXpYKeYld8YX5NrvjViuVfIJeiqLZeGjxOWe5fqQqQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-regex": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-aKuc/+/KE9swahTbYpSuOsQa7LggPx7jhfobJLPVVbAic80OpfCIY+MKr6Ax4R6UtQwF90O5Yk6OEmbbvtEmiA==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-slip-encoder": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-slip-encoder/-/parser-slip-encoder-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-3ZI/swd2it20vmu2tzqDbkyE4dqy+kExEDY6T33YQ210HDKPVhqj7FAVGo5P++MZ3dup1of11t4P9UPBNkuJnQ==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/parser-spacepacket": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-spacepacket/-/parser-spacepacket-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-+hqRckrTEqz+/uAUZY0Tq6YIRyCl4oQOH1MeVzKiFiGNjZP7hDJCDoY7LTr9CeJhxvcT0ItTbtjGBqGumV8fxg==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@serialport/stream": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-Zty7B8C1H2XRnay2mVmW1ygEHXRHXQDcaC5wAVvOZMbQSc7ye03rMlPvviDS+pGxU2t2A2bMo34CUrRduSBong==",
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/bindings-interface": "1.2.2",
|
|
||||||
"debug": "4.3.4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/debug": {
|
|
||||||
"version": "4.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"ms": "2.1.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"supports-color": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ms": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
|
||||||
},
|
|
||||||
"node_modules/node-addon-api": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
|
||||||
"integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="
|
|
||||||
},
|
|
||||||
"node_modules/node-gyp-build": {
|
|
||||||
"version": "4.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz",
|
|
||||||
"integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==",
|
|
||||||
"bin": {
|
|
||||||
"node-gyp-build": "bin.js",
|
|
||||||
"node-gyp-build-optional": "optional.js",
|
|
||||||
"node-gyp-build-test": "build-test.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/serialport": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/serialport/-/serialport-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-bxs3XejQcOHWpzPAaXMhxVRlbem6fjNUrux3ToqrGvFR6BcjOYhqE5CsHOuutv37kmhmnuHrn+/hN+1BpTmaFg==",
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/binding-mock": "10.2.2",
|
|
||||||
"@serialport/bindings-cpp": "11.0.1",
|
|
||||||
"@serialport/parser-byte-length": "11.0.0",
|
|
||||||
"@serialport/parser-cctalk": "11.0.0",
|
|
||||||
"@serialport/parser-delimiter": "11.0.0",
|
|
||||||
"@serialport/parser-inter-byte-timeout": "11.0.0",
|
|
||||||
"@serialport/parser-packet-length": "11.0.0",
|
|
||||||
"@serialport/parser-readline": "11.0.0",
|
|
||||||
"@serialport/parser-ready": "11.0.0",
|
|
||||||
"@serialport/parser-regex": "11.0.0",
|
|
||||||
"@serialport/parser-slip-encoder": "11.0.0",
|
|
||||||
"@serialport/parser-spacepacket": "11.0.0",
|
|
||||||
"@serialport/stream": "11.0.0",
|
|
||||||
"debug": "4.3.4"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12.0.0"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://opencollective.com/serialport/donate"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/binding-mock": {
|
|
||||||
"version": "10.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/binding-mock/-/binding-mock-10.2.2.tgz",
|
|
||||||
"integrity": "sha512-HAFzGhk9OuFMpuor7aT5G1ChPgn5qSsklTFOTUX72Rl6p0xwcSVsRtG/xaGp6bxpN7fI9D/S8THLBWbBgS6ldw==",
|
|
||||||
"requires": {
|
|
||||||
"@serialport/bindings-interface": "^1.2.1",
|
|
||||||
"debug": "^4.3.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@serialport/bindings-cpp": {
|
|
||||||
"version": "11.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/bindings-cpp/-/bindings-cpp-11.0.1.tgz",
|
|
||||||
"integrity": "sha512-3I1mniVg3osYuIUXxU0jB5AHPsxWmErmc3JC3WfUSlfXsjWMHkHfFzbW9Scuv/z/6DLCJIDyltabRa2FoW2qsQ==",
|
|
||||||
"requires": {
|
|
||||||
"@serialport/bindings-interface": "1.2.2",
|
|
||||||
"@serialport/parser-readline": "10.5.0",
|
|
||||||
"debug": "4.3.4",
|
|
||||||
"node-addon-api": "6.1.0",
|
|
||||||
"node-gyp-build": "4.6.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/parser-delimiter": {
|
|
||||||
"version": "10.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-10.5.0.tgz",
|
|
||||||
"integrity": "sha512-/uR/yT3jmrcwnl2FJU/2ySvwgo5+XpksDUR4NF/nwTS5i3CcuKS+FKi/tLzy1k8F+rCx5JzpiK+koqPqOUWArA=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-readline": {
|
|
||||||
"version": "10.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-10.5.0.tgz",
|
|
||||||
"integrity": "sha512-0aXJknodcl94W9zSjvU+sLdXiyEG2rqjQmvBWZCr8wJZjWEtv3RgrnYiWq4i2OTOyC8C/oPK8ZjpBjQptRsoJQ==",
|
|
||||||
"requires": {
|
|
||||||
"@serialport/parser-delimiter": "10.5.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@serialport/bindings-interface": {
|
|
||||||
"version": "1.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/bindings-interface/-/bindings-interface-1.2.2.tgz",
|
|
||||||
"integrity": "sha512-CJaUd5bLvtM9c5dmO9rPBHPXTa9R2UwpkJ0wdh9JCYcbrPWsKz+ErvR0hBLeo7NPeiFdjFO4sonRljiw4d2XiA=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-byte-length": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-byte-length/-/parser-byte-length-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-rExsdFKdzOIHOBqTwzxUF1A9nrluVIZKZOtvMq5i0Hc3euooGdmkx0VXYNRlI2rd6kJLTL2P+uIR+ZtCTRyT+w=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-cctalk": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-cctalk/-/parser-cctalk-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-eN1MvEIFwI4GedWJhte6eWF+NZtrjchZbMf0CE6NV9TRzJI1KLnFf90ZOj/mhGuANojX4sqWfJKQXwN6E8VSHQ=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-delimiter": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-delimiter/-/parser-delimiter-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-aZLJhlRTjSmEwllLG7S4J8s8ctRAS0cbvCpO87smLvl3e4BgzbVgF6Z6zaJd3Aji2uSiYgfedCdNc4L6W+1E2g=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-inter-byte-timeout": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-inter-byte-timeout/-/parser-inter-byte-timeout-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-RLgqZC50IET6FtEIt6Oi0vdRsesSBWLNwB7ldzR9OzyXKgK0XHRzqKqbB0u5Q+tC5OScdWeiQ2AO6jooKUZtsw=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-packet-length": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-packet-length/-/parser-packet-length-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-6ZkOiaCooabpV/EM7ttSRbisbDWpGEf7Yxyr13t28LicYR43THRdjdMZcRnWxEM/jpwfskkLLXAR6wziVpKrlw=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-readline": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-readline/-/parser-readline-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-rRAivhRkT3YO28WjmmG4FQX6L+KMb5/ikhyylRfzWPw0nSXy97+u07peS9CbHqaNvJkMhH1locp2H36aGMOEIA==",
|
|
||||||
"requires": {
|
|
||||||
"@serialport/parser-delimiter": "11.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@serialport/parser-ready": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-ready/-/parser-ready-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-lSsCPIctoc5kADCKnZDYBz1j69TsFqtnaWUicBzUAIAoUXpYKeYld8YX5NrvjViuVfIJeiqLZeGjxOWe5fqQqQ=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-regex": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-regex/-/parser-regex-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-aKuc/+/KE9swahTbYpSuOsQa7LggPx7jhfobJLPVVbAic80OpfCIY+MKr6Ax4R6UtQwF90O5Yk6OEmbbvtEmiA=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-slip-encoder": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-slip-encoder/-/parser-slip-encoder-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-3ZI/swd2it20vmu2tzqDbkyE4dqy+kExEDY6T33YQ210HDKPVhqj7FAVGo5P++MZ3dup1of11t4P9UPBNkuJnQ=="
|
|
||||||
},
|
|
||||||
"@serialport/parser-spacepacket": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/parser-spacepacket/-/parser-spacepacket-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-+hqRckrTEqz+/uAUZY0Tq6YIRyCl4oQOH1MeVzKiFiGNjZP7hDJCDoY7LTr9CeJhxvcT0ItTbtjGBqGumV8fxg=="
|
|
||||||
},
|
|
||||||
"@serialport/stream": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@serialport/stream/-/stream-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-Zty7B8C1H2XRnay2mVmW1ygEHXRHXQDcaC5wAVvOZMbQSc7ye03rMlPvviDS+pGxU2t2A2bMo34CUrRduSBong==",
|
|
||||||
"requires": {
|
|
||||||
"@serialport/bindings-interface": "1.2.2",
|
|
||||||
"debug": "4.3.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"debug": {
|
|
||||||
"version": "4.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
|
||||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
|
||||||
"requires": {
|
|
||||||
"ms": "2.1.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ms": {
|
|
||||||
"version": "2.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
|
||||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
|
||||||
},
|
|
||||||
"node-addon-api": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz",
|
|
||||||
"integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA=="
|
|
||||||
},
|
|
||||||
"node-gyp-build": {
|
|
||||||
"version": "4.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz",
|
|
||||||
"integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ=="
|
|
||||||
},
|
|
||||||
"serialport": {
|
|
||||||
"version": "11.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/serialport/-/serialport-11.0.0.tgz",
|
|
||||||
"integrity": "sha512-bxs3XejQcOHWpzPAaXMhxVRlbem6fjNUrux3ToqrGvFR6BcjOYhqE5CsHOuutv37kmhmnuHrn+/hN+1BpTmaFg==",
|
|
||||||
"requires": {
|
|
||||||
"@serialport/binding-mock": "10.2.2",
|
|
||||||
"@serialport/bindings-cpp": "11.0.1",
|
|
||||||
"@serialport/parser-byte-length": "11.0.0",
|
|
||||||
"@serialport/parser-cctalk": "11.0.0",
|
|
||||||
"@serialport/parser-delimiter": "11.0.0",
|
|
||||||
"@serialport/parser-inter-byte-timeout": "11.0.0",
|
|
||||||
"@serialport/parser-packet-length": "11.0.0",
|
|
||||||
"@serialport/parser-readline": "11.0.0",
|
|
||||||
"@serialport/parser-ready": "11.0.0",
|
|
||||||
"@serialport/parser-regex": "11.0.0",
|
|
||||||
"@serialport/parser-slip-encoder": "11.0.0",
|
|
||||||
"@serialport/parser-spacepacket": "11.0.0",
|
|
||||||
"@serialport/stream": "11.0.0",
|
|
||||||
"debug": "4.3.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"dependencies": {
|
|
||||||
"@serialport/parser-readline": "^11.0.0",
|
|
||||||
"serialport": "^11.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user