Fix osai big FILE

This commit is contained in:
Lucio Maranta
2019-07-01 15:18:20 +00:00
parent b6e56bd1d7
commit b094fa50b4
3 changed files with 13 additions and 6 deletions
+2 -1
View File
@@ -121,7 +121,8 @@ namespace CMS_CORE_Application
cmsError = N.PROC_RSelectedProcessData(1, ref selected);
cmsError = N.NC_SetScreenVisible(Nc.SCREEN_PAGE.Fanuc_Custom2);
List<AxisModel> ax = new List<AxisModel>();
cmsError = N.AXES_RAxesNames(1, ref ax);
sw.Stop();
Console.WriteLine(sw.ElapsedMilliseconds);
+3 -1
View File
@@ -162,7 +162,9 @@
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="Connected Services\OPENControl\CMS_CORE_Library.OPENControl.AxesRefResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon>
</None>
+8 -4
View File
@@ -106,6 +106,10 @@ namespace CMS_CORE_Library.Osai
Url = "http://" + Ip + ":" + Port;
endPointAddress = new EndpointAddress(new Uri(Url));
HttpBinding.MaxBufferSize = int.MaxValue;
HttpBinding.MaxReceivedMessageSize = int.MaxValue;
HttpBinding.MaxBufferPoolSize = int.MaxValue;
//Open the connection
OpenNC = new OPENcontrolPortTypeClient(HttpBinding, endPointAddress);
@@ -2950,10 +2954,10 @@ namespace CMS_CORE_Library.Osai
return GetNCError(errorClass, errorNum);
// Read file content
if (size >= 65536)
{
size = 65534;
}
//if (size >= 65536)
//{
// size = 65534;
//}
// nReturn = OpenNC.GetFile(filePath, ref size, out fileContentContent, out errorClass, out errorNum);
nReturn = OpenNC.GetBinaryFile(filePath, size, out byte[] data, out errorClass, out errorNum);
// Convert byte[] into string