TCP client added to the C-7000 controller

master
mDescape 3 years ago
parent 2fb4eae815
commit 0b649689cc
  1. 0
      Code/Matlab/TCP-Server.m
  2. BIN
      Code/Visual_Basic/.vs/C7000_Test/DesignTimeBuild/.dtbcache
  3. BIN
      Code/Visual_Basic/.vs/C7000_Test/v16/.suo
  4. BIN
      Code/Visual_Basic/.vs/C7000_Test/v16/Server/sqlite3/storage.ide
  5. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/DesignTimeBuild/.dtbcache
  6. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/.suo
  7. 0
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/Server/sqlite3/db.lock
  8. BIN
      Code/Visual_Basic/C7000_Main/.vs/C7000_Test/v16/Server/sqlite3/storage.ide
  9. 2
      Code/Visual_Basic/C7000_Main/C7000_Test/C7000_Test.vbproj
  10. 131
      Code/Visual_Basic/C7000_Main/C7000_Test/Program.vb
  11. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/SkCommIo.dll
  12. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/Debug/netcoreapp3.1/C7000_SDK.dll
  13. 16
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/Debug/netcoreapp3.1/C7000_Test.deps.json
  14. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/Debug/netcoreapp3.1/C7000_Test.dll
  15. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/Debug/netcoreapp3.1/C7000_Test.pdb
  16. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/x86/Debug/netcoreapp3.1/C7000_Test.dll
  17. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/x86/Debug/netcoreapp3.1/C7000_Test.pdb
  18. 20
      Code/Visual_Basic/C7000_Main/C7000_Test/bin/x86/Debug/netcoreapp3.1/SkCommIo.log
  19. 2
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/C7000_Test.vbproj.nuget.cache
  20. 10
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/C7000_Test.vbproj.nuget.dgspec.json
  21. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/Debug/netcoreapp3.1/C7000_Test.assets.cache
  22. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/Debug/netcoreapp3.1/C7000_Test.dll
  23. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/Debug/netcoreapp3.1/C7000_Test.pdb
  24. 0
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/Debug/netcoreapp3.1/C7000_Test.vbproj.CopyComplete
  25. 13
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/Debug/netcoreapp3.1/C7000_Test.vbproj.FileListAbsolute.txt
  26. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/Debug/netcoreapp3.1/C7000_Test.vbprojAssemblyReference.cache
  27. 6
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/project.assets.json
  28. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/x86/Debug/netcoreapp3.1/C7000_Test.assets.cache
  29. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/x86/Debug/netcoreapp3.1/C7000_Test.dll
  30. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/x86/Debug/netcoreapp3.1/C7000_Test.pdb
  31. 13
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/x86/Debug/netcoreapp3.1/C7000_Test.vbproj.FileListAbsolute.txt
  32. BIN
      Code/Visual_Basic/C7000_Main/C7000_Test/obj/x86/Debug/netcoreapp3.1/C7000_Test.vbprojAssemblyReference.cache
  33. BIN
      Code/Visual_Basic/TCP-Client/.vs/TCP-Client/DesignTimeBuild/.dtbcache
  34. BIN
      Code/Visual_Basic/TCP-Client/.vs/TCP-Client/v16/.suo
  35. BIN
      Code/Visual_Basic/TCP-Client/.vs/TCP-Client/v16/Server/sqlite3/storage.ide
  36. 8
      Code/Visual_Basic/TCP-Client/TCP-Client/Program.vb
  37. BIN
      Code/Visual_Basic/TCP-Client/TCP-Client/bin/Debug/netcoreapp3.1/TCP-Client.dll
  38. BIN
      Code/Visual_Basic/TCP-Client/TCP-Client/bin/Debug/netcoreapp3.1/TCP-Client.pdb
  39. BIN
      Code/Visual_Basic/TCP-Client/TCP-Client/obj/Debug/netcoreapp3.1/TCP-Client.dll
  40. BIN
      Code/Visual_Basic/TCP-Client/TCP-Client/obj/Debug/netcoreapp3.1/TCP-Client.pdb
  41. BIN
      Code/Visual_Basic/TCP-Client/TCP-Client/obj/Debug/netcoreapp3.1/TCP-Client.vbprojAssemblyReference.cache
  42. 0
      images/logo-VHIR.png
  43. 0
      images/logo-ub.jpg

@ -9,7 +9,7 @@
<ItemGroup>
<Reference Include="C7000_SDK">
<HintPath>..\..\SDK\C7000_SDK.dll</HintPath>
<HintPath>..\..\..\..\C7000 _SDK\SDK\C7000_SDK.dll</HintPath>
</Reference>
</ItemGroup>

@ -1,4 +1,6 @@
Imports System
Imports System.Net
Imports System.Net.Sockets
Public Module GlobalVariables
@ -21,10 +23,19 @@ End Module
Module Program
Sub Main(args As String())
Dim SDKResult As Long
Dim num_mesures As UInt16 = 0
Dim Label_Status As String
Dim Label_Ring As String
Dim Lux(10) As Double 'Array of illuminances mesuared
Dim server_ip As String
Dim Port As Integer = 30000 'Port where the server is
Dim VBClient As Sockets.TcpClient
Dim VBClientStream As Sockets.NetworkStream
Dim num_measures As Int16 = 0
Dim index As Int16 = 0
Dim mean_lx As Double
Dim min_lx As Double
Dim max_lx As Double
' >>>>> Initialize Array of Measurement Results <<<<<
ReDim MeasResult.SpectralData_1nm(C7000.SDK.SKF_WAVELENGTH_1NM_COUNT - 1)
@ -32,59 +43,95 @@ Module Program
ReDim MeasResult.ColorRenditionIndexes.Ri(C7000.SDK.SKF_CRI_COUNT - 1)
ReDim MeasResult.TM30.HueBins(C7000.SDK.SKF_TM30_BINS_COUNT - 1) '#1101
Console.WriteLine(" >>>>> Test_mk2 <<<<< ")
Console.WriteLine(" >>>>> C-7000 Controller - Client <<<<< ")
'Server connection secuence:
Console.WriteLine("Enter server IP") 'IP of the server
server_ip = Console.ReadLine()
Console.WriteLine("Connecting to the server...")
VBClient = New Sockets.TcpClient(server_ip, Port)
VBClientStream = VBClient.GetStream() 'Check the data for incomming data
Console.WriteLine("Connection to the server sucessful")
'Connection secuence:
'Connection of the C-7000 secuence:
SDKResult = C7000Device.SK_Connect() 'Start connection to the device
SDKResult = C7000Device.SK_GetDeviceInfo(DeviceInfo) 'Get basic info of the device (Ring position, status...)
SDKResult = C7000Device.SK_SetRemoteMode(C7000.SDK.SKF_REMOTE.REMOTE_ON) 'Prepare the device to work in Remote Mode (via software)
SDKResult = C7000Device.SK_GetMeasConfig(Config) 'Get the current config values (exposure time, field of view...)
'If SDKResult is always 0 --> success, else error happened
Console.WriteLine("Conexió exitosa!")
SDKResult = C7000Device.SK_SetMeasConfig(Config) 'Change the Measurmen configuration here
Console.WriteLine("Inici de les mesures")
While num_mesures < 10
While True
If True = Check_Status(C7000Device.SK_GetDeviceInfo(DeviceInfo)) Then ' If everything is OK
Label_Status = Get_DeveiceStats(DeviceInfo) ' Get Device Status
Label_Ring = Get_RingStatus(DeviceInfo) ' Get Light Selection Ring
Select Case Sequence
Case SequenceCtrKey.IDLE
Sequence = Start_Measurement()
Case SequenceCtrKey.MEASURING
If C7000.SDK.SKF_STATUS_DEVICE.BUSY_MEASURING <> DeviceInfo.Status Then 'If measurement is finished
Call Monitor_MeasuringResult() 'Take the results
Sequence = SequenceCtrKey.IDLE 'Indicate we are back to IDLE
Exit While 'Exit While loop
End If
End Select
End If
Console.WriteLine("Successful connection whith the C-7000")
'SDKResult = C7000Device.SK_SetMeasConfig(Config) 'Change the Measurmen configuration here
While True 'Main Loop
While True <> VBClientStream.DataAvailable 'While there's no new data
'Wait
End While
Dim data_rx(VBClient.ReceiveBufferSize) As Byte
VBClientStream.Read(data_rx, 0, CInt(VBClient.ReceiveBufferSize))
num_measures = BitConverter.ToInt16(data_rx, 0)
Dim Lux(num_measures) As Double 'Array of illuminances mesuared
Lux(num_mesures) = CDbl(Result_Illmi) 'Cast from string to Double -(CInt, CLng)-
Console.WriteLine(" Mesura " + Convert.ToString(num_mesures + 1) + ": " + Result_Illmi + " lx")
num_mesures += 1
End While
If -1 = num_measures Then 'If -1 is sent from the server
Exit While 'Finish the program
End If
Console.WriteLine("Starting measures...")
While num_measures > 0
While True
If True = Check_Status(C7000Device.SK_GetDeviceInfo(DeviceInfo)) Then ' If everything is OK
Label_Status = Get_DeveiceStats(DeviceInfo) ' Get Device Status
Label_Ring = Get_RingStatus(DeviceInfo) ' Get Light Selection Ring
Select Case Sequence
Case SequenceCtrKey.IDLE
Sequence = Start_Measurement()
Case SequenceCtrKey.MEASURING
If C7000.SDK.SKF_STATUS_DEVICE.BUSY_MEASURING <> DeviceInfo.Status Then 'If measurement is finished
Call Monitor_MeasuringResult() 'Take the results
Sequence = SequenceCtrKey.IDLE 'Indicate we are back to IDLE
Exit While 'Exit While loop
End If
End Select
End If
End While
Lux(index) = CDbl(Result_Illmi) 'Cast from string to Double
Console.WriteLine(" Measure " + Convert.ToString(index + 1) + ": " + Result_Illmi + " lx")
index += 1
num_measures -= 1
End While
Console.WriteLine("Measures completed")
Console.WriteLine("")
For i As Int16 = 0 To index
mean_lx += Lux(i)
Next i
mean_lx = mean_lx / index
max_lx = Lux.Max()
min_lx = Lux.Min()
Console.Write("Mean of the measures: ")
Console.WriteLine(mean_lx)
Console.Write("Max Value: ")
Console.WriteLine(max_lx)
Console.Write("Min Value: ")
Console.WriteLine(min_lx)
index = 0
'Creation of the packet to be send to the server
Dim mean_byte As Byte() = BitConverter.GetBytes(mean_lx)
Dim max_byte As Byte() = BitConverter.GetBytes(max_lx)
Dim min_byte As Byte() = BitConverter.GetBytes(min_lx)
Dim data_tx() As Byte = mean_byte.Concat(max_byte.Concat(min_byte).ToArray).ToArray 'Concatenate the 3 values
VBClient.Client.Send(data_tx) 'Send it
End While
'Disconnection secuence:
SDKResult = C7000Device.SK_SetRemoteMode(C7000.SDK.SKF_REMOTE.REMOTE_OFF) 'Back to manual mode (pressing buttons)
SDKResult = C7000Device.SK_Disconnect() 'Stop the connection to the device
'If SDKResult is always 0 --> success, else error happened
Console.WriteLine("Mesures finalitzades")
Console.WriteLine("")
Console.WriteLine("Mitjana de totes les mesures:")
For i As Int16 = 1 To 9
Lux(0) = Lux(0) + Lux(i)
Next i
Lux(0) = Lux(0) / 10
Console.WriteLine(Lux(0))
End Sub

@ -7,9 +7,20 @@
"targets": {
".NETCoreApp,Version=v3.1": {
"C7000_Test/1.0.0": {
"dependencies": {
"C7000_SDK": "2.0.0.1"
},
"runtime": {
"C7000_Test.dll": {}
}
},
"C7000_SDK/2.0.0.1": {
"runtime": {
"C7000_SDK.dll": {
"assemblyVersion": "2.0.0.1",
"fileVersion": "2.0.0.1"
}
}
}
}
},
@ -18,6 +29,11 @@
"type": "project",
"serviceable": false,
"sha512": ""
},
"C7000_SDK/2.0.0.1": {
"type": "reference",
"serviceable": false,
"sha512": ""
}
}
}

@ -718,3 +718,23 @@
[#2020/03/15 22:01:49.704]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/03/15 22:02:16.316]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/03/15 22:33:14.626]SkCommIo_RecvData :Status=0x2021000f:GetLastError=0x00000000
[#2020/03/19 13:16:13.165]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:16:13.180]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:16:13.243]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:16:13.274]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:03.525]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:03.555]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:03.575]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:03.624]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:12.540]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:12.552]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:12.562]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:20:12.582]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:21:39.279]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:21:39.294]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:21:39.310]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/19 13:21:39.310]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/20 12:15:58.161]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/20 12:15:58.223]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/20 12:15:58.301]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000
[#2020/03/20 12:15:58.379]SkCommIo_SendData :Status=0x20210003:GetLastError=0x00000000

@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "IA3eR8kZRELSzPyIX3JTasJk4XelYa3mtniBF1j0uhtMDAXMjllFh1QHCChseS6Z2YT21dU9v1SlvZeocBYOUA==",
"dgSpecHash": "nLAKRM4i4b+e14weHciOrtcoHd+vfSokS1QLIKCtrU1eP+Q9Dnxie6PvNsqvjtkeMbfpvUm95lPKGPbrdR4+4w==",
"success": true
}

@ -1,17 +1,17 @@
{
"format": 1,
"restore": {
"C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\C7000_Test.vbproj": {}
"C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\C7000_Test.vbproj": {}
},
"projects": {
"C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\C7000_Test.vbproj": {
"C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\C7000_Test.vbproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\C7000_Test.vbproj",
"projectUniqueName": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\C7000_Test.vbproj",
"projectName": "C7000_Test",
"projectPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\C7000_Test.vbproj",
"projectPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\C7000_Test.vbproj",
"packagesPath": "C:\\Users\\migue\\.nuget\\packages\\",
"outputPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\obj\\",
"outputPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\migue\\AppData\\Roaming\\NuGet\\NuGet.Config",

@ -9,3 +9,16 @@ C:\Users\migue\Desktop\C7000 - SDK\Test\C7000_Test\C7000_Test\obj\Debug\netcorea
C:\Users\migue\Desktop\C7000 - SDK\Test\C7000_Test\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.AssemblyInfo.vb
C:\Users\migue\Desktop\C7000 - SDK\Test\C7000_Test\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.dll
C:\Users\migue\Desktop\C7000 - SDK\Test\C7000_Test\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.pdb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.vbprojAssemblyReference.cache
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.AssemblyInfoInputs.cache
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.AssemblyInfo.vb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.dll
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.pdb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_Test.exe
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_Test.deps.json
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_Test.runtimeconfig.json
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_Test.runtimeconfig.dev.json
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_Test.dll
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_Test.pdb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\Debug\netcoreapp3.1\C7000_SDK.dll
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\Debug\netcoreapp3.1\C7000_Test.vbproj.CopyComplete

@ -13,11 +13,11 @@
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\C7000_Test.vbproj",
"projectUniqueName": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\C7000_Test.vbproj",
"projectName": "C7000_Test",
"projectPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\C7000_Test.vbproj",
"projectPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\C7000_Test.vbproj",
"packagesPath": "C:\\Users\\migue\\.nuget\\packages\\",
"outputPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Test\\obj\\",
"outputPath": "C:\\Users\\migue\\git\\TFG\\Code\\Visual_Basic\\C7000_Main\\C7000_Test\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\migue\\AppData\\Roaming\\NuGet\\NuGet.Config",

@ -37,3 +37,16 @@ C:\Users\migue\Desktop\C7000 - SDK\C7000_Test2\C7000_Test\obj\x86\Debug\netcorea
C:\Users\migue\Desktop\C7000 - SDK\C7000_Test2\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.vbproj.CopyComplete
C:\Users\migue\Desktop\C7000 - SDK\C7000_Test2\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.dll
C:\Users\migue\Desktop\C7000 - SDK\C7000_Test2\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.pdb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_Test.exe
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_Test.deps.json
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_Test.runtimeconfig.json
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_Test.runtimeconfig.dev.json
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_Test.dll
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_Test.pdb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\bin\x86\Debug\netcoreapp3.1\C7000_SDK.dll
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.vbprojAssemblyReference.cache
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.AssemblyInfoInputs.cache
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.AssemblyInfo.vb
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.vbproj.CopyComplete
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.dll
C:\Users\migue\git\TFG\Code\Visual_Basic\C7000_Main\C7000_Test\obj\x86\Debug\netcoreapp3.1\C7000_Test.pdb

@ -8,10 +8,10 @@ Module Program
Dim TCPClientStream As Sockets.NetworkStream
Sub Main(args As String())
System.Console.WriteLine("Waiting for the conenction")
Console.WriteLine("Waiting for the conenction")
TCPClientz = New Sockets.TcpClient(server_ip, port) 'Connect to the matlab server
TCPClientStream = TCPClientz.GetStream() 'Check the data comming
System.Console.WriteLine("Connected to the Server")
Console.WriteLine("Connected to the Server")
'Send data:
Dim sendbytes() As Byte = System.Text.Encoding.ASCII.GetBytes("Hello from Visual Basic") 'codifie the message to be sent
@ -22,8 +22,8 @@ Module Program
'Receive data:
Dim rcvbytes(TCPClientz.ReceiveBufferSize) As Byte
TCPClientStream.Read(rcvbytes, 0, CInt(TCPClientz.ReceiveBufferSize))
System.Console.WriteLine("New data received:")
System.Console.WriteLine(System.Text.Encoding.ASCII.GetString(rcvbytes))
Console.WriteLine("New data received:")
Console.WriteLine(System.Text.Encoding.ASCII.GetString(rcvbytes))
End Sub
End Module

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Loading…
Cancel
Save