Skip to content
Snippets Groups Projects
Commit 950ec6f7 authored by Tim Übelhör's avatar Tim Übelhör
Browse files

Removed the CLR project since it makes sense to use the ModeliChart interfaces in it.

parent e310a96d
Branches
No related tags found
No related merge requests found
Showing
with 0 additions and 681 deletions
#include "stdafx.h"
using namespace System;
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
using namespace System::Security::Permissions;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute(L"ModeliRpcCLR")];
[assembly:AssemblyDescriptionAttribute(L"")];
[assembly:AssemblyConfigurationAttribute(L"")];
[assembly:AssemblyCompanyAttribute(L"")];
[assembly:AssemblyProductAttribute(L"ModeliRpcCLR")];
[assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2017")];
[assembly:AssemblyTrademarkAttribute(L"")];
[assembly:AssemblyCultureAttribute(L"")];
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];
[assembly:ComVisible(false)];
[assembly:CLSCompliantAttribute(true)];
\ No newline at end of file
#include "stdafx.h"
#include "LogEventArgs.h"
LogEventArgs::LogEventArgs()
{
}
#pragma once
using namespace System;
ref class LogEventArgs : public EventArgs
{
public:
LogEventArgs();
property String^ InstanceName;
property int Status;
property String^ Message;
};
#include "stdafx.h"
#include "ModeliRpc.h"
#include "msclr/marshal_cppstd.h"
using namespace msclr::interop;
using namespace System::Runtime::InteropServices;
namespace ModeliRpc
{
FrontendRpc::FrontendRpc(String^ address, int port)
{
// Managed callbacks
_newValues = gcnew NewValuesDelegate(this, &FrontendRpc::onNewValues);
_log = gcnew LogDelegate(this, &FrontendRpc::onLog);
// Load the unmanged instance
HINSTANCE _rpcDll = LoadLibrary("ModeliRpcNative.dll");
if (!_rpcDll)
{
throw gcnew Exception("Unable to load ModeliRpcNative.dll!");
}
createRpcFrontendType createRpcFrontend = reinterpret_cast<createRpcFrontendType>(GetProcAddress(_rpcDll, "create_klass"));
if (!createRpcFrontend)
{
FreeLibrary(_rpcDll);
throw gcnew Exception("Unable to load createRpcFrontend from DLL!");
}
_rpcFrontend = createRpcFrontend();
// Register callbacks
_rpcFrontend->registerCallbacks(
static_cast<NewValuesCallback>(Marshal::GetFunctionPointerForDelegate(_newValues).ToPointer()),
static_cast<LogCallback>(Marshal::GetFunctionPointerForDelegate(_log).ToPointer()));
// Connect
_rpcFrontend->connect(marshal_as<std::string>(address), port);
}
FrontendRpc::~FrontendRpc()
{
// Call the finalizer
this->!FrontendRpc();
}
FrontendRpc::!FrontendRpc()
{
// Clear all unmanaged resources
if (_rpcFrontend)
{
_rpcFrontend->destroy();
}
if (_rpcDll)
{
FreeLibrary(_rpcDll);
}
}
int FrontendRpc::Play()
{
return _rpcFrontend->play();
}
int FrontendRpc::PlayFast(double timeToPlay)
{
return _rpcFrontend->playFast(timeToPlay);
}
void FrontendRpc::Pause()
{
_rpcFrontend->pause();
}
int FrontendRpc::Stop()
{
return _rpcFrontend->stop();
}
bool FrontendRpc::AddFmu(String ^ instanceName, array<Byte>^ fmuFileBuffer)
{
// Prevent GC from moving the memory
pin_ptr<unsigned char> pin = &fmuFileBuffer[0];
unsigned char* src = pin;
std::vector<unsigned char> buffer(src, src + fmuFileBuffer->Length);
return _rpcFrontend->addFmu(marshal_as<std::string>(instanceName), buffer);
}
bool FrontendRpc::RemoveFmu(String ^ instanceName)
{
return _rpcFrontend->removeFmu(marshal_as<std::string>(instanceName));
}
bool FrontendRpc::AddChannelLink(RpcChannelLink ^ channelLink)
{
// Native struct
ChannelLink nativeLink = {};
nativeLink.masterInstanceName = marshal_as<std::string>(channelLink->MasterInstanceName);
nativeLink.slaveInstanceName = marshal_as<std::string>(channelLink->SlaveInstanceName);
nativeLink.masterValueRef = channelLink->MasterValueRef;
nativeLink.slaveValueRef = channelLink->SlaveValueRef;
nativeLink.factor = channelLink->Factor;
nativeLink.offset = channelLink->Offset;
return _rpcFrontend->addChannelLink(nativeLink);
}
bool FrontendRpc::RemoveChannelLink(RpcChannelLink ^ channelLink)
{
// Native struct
ChannelLink nativeLink = {};
nativeLink.masterInstanceName = marshal_as<std::string>(channelLink->MasterInstanceName);
nativeLink.slaveInstanceName = marshal_as<std::string>(channelLink->SlaveInstanceName);
nativeLink.masterValueRef = channelLink->MasterValueRef;
nativeLink.slaveValueRef = channelLink->SlaveValueRef;
nativeLink.factor = channelLink->Factor;
nativeLink.offset = channelLink->Offset;
return _rpcFrontend->removeChannelink(nativeLink);
}
int FrontendRpc::SetValues(String^ instanceName, array<unsigned int>^ intVRs, array<int>^ intValues, array<unsigned int>^ realVRs, array<double>^ realValues, array<unsigned int>^ boolVRs, array<int>^ boolValues, array<unsigned int>^ stringVRs, array<String^>^ stringValues)
{
ValuesStruct values = {};
values.instanceName = marshal_as<std::string>(instanceName);
// Int
pin_ptr<uint32_t> pinIntVrs = &intVRs[0];
uint32_t* srcIntVrs = pinIntVrs;
values.integerValueRefs.assign(srcIntVrs, srcIntVrs + intVRs->Length);
pin_ptr<int32_t> pinIntValues = &intValues[0];
int32_t* srcIntValues = pinIntValues;
values.integerValues.assign(srcIntValues, srcIntValues + intValues->Length);
// Real
pin_ptr<uint32_t> pinRealVrs = &realVRs[0];
uint32_t* srcRealVrs = pinRealVrs;
values.realValueRefs.assign(srcRealVrs, srcRealVrs + realVRs->Length);
pin_ptr<double> pinRealValues = &realValues[0];
double* srcRealValues = pinRealValues;
values.realValues.assign(srcRealValues, srcRealValues + realValues->Length);
// Bool
pin_ptr<uint32_t> pinBoolVrs = &boolVRs[0];
uint32_t* srcBoolVrs = pinBoolVrs;
values.boolValueRefs.assign(srcBoolVrs, srcBoolVrs + boolVRs->Length);
pin_ptr<int32_t> pinBoolValues = &boolValues[0];
int32_t* srcBoolValues = pinBoolValues;
values.boolValues.assign(srcBoolValues, srcBoolValues + boolValues->Length);
// String
pin_ptr<uint32_t> pinStringVrs = &stringVRs[0];
uint32_t* srcStringVrs = pinStringVrs;
values.stringValueRefs.assign(srcStringVrs, srcStringVrs + stringVRs->Length);
for (int i = 0; i < stringValues->Length; i++)
{
auto temp = stringValues[i]; // I dont know why marshal_as doesnt take stringValues[i]
values.stringValues.push_back(marshal_as<std::string>(temp));
}
// RPC call
return _rpcFrontend->setValues(values);
}
void FrontendRpc::onNewValues(double timestamp, ValuesStruct values)
{
// Copy data into the EventArgs
auto args = gcnew NewValuesEventArgs();
args->Timestamp = timestamp;
args->InstanceName = marshal_as<String^>(values.instanceName);
// Int
args->IntegerValueRefs = gcnew array<unsigned int>(static_cast<int>(values.integerValueRefs.size()));
pin_ptr<unsigned int> pinIntegerVrs = &args->IntegerValueRefs[0];
memcpy_s(pinIntegerVrs, args->IntegerValueRefs->Length, values.integerValueRefs.data(), values.integerValueRefs.size());
args->IntegerValues = gcnew array<int>(static_cast<int>(values.integerValues.size()));
pin_ptr<int> pinIntegerValues = &args->IntegerValues[0];
memcpy_s(pinIntegerValues, args->IntegerValues->Length, values.integerValues.data(), values.integerValues.size());
// Real
args->RealValueRefs = gcnew array<unsigned int>(static_cast<int>(values.realValueRefs.size()));
pin_ptr<unsigned int> pinRealVrs = &args->RealValueRefs[0];
memcpy_s(pinRealVrs, args->RealValueRefs->Length, values.realValueRefs.data(), values.realValueRefs.size());
args->RealValues = gcnew array<double>(static_cast<int>(values.realValues.size()));
pin_ptr<double> pinRealValues = &args->RealValues[0];
memcpy_s(pinIntegerValues, args->RealValues->Length, values.realValues.data(), values.realValues.size());
// Bool
args->BoolValueRefs = gcnew array<unsigned int>(static_cast<int>(values.boolValueRefs.size()));
pin_ptr<unsigned int> pinBoolVrs = &args->BoolValueRefs[0];
memcpy_s(pinBoolVrs, args->BoolValueRefs->Length, values.boolValueRefs.data(), values.boolValueRefs.size());
args->BoolValues = gcnew array<int>(static_cast<int>(values.boolValues.size()));
pin_ptr<int> pinBoolValues = &args->BoolValues[0];
memcpy_s(pinBoolValues, args->BoolValueRefs->Length, values.boolValues.data(), values.boolValues.size());
// String no memcpy possible because each string needs to be marshalled
args->StringValueRefs = gcnew array<unsigned int>(static_cast<int>(values.stringValueRefs.size()));
pin_ptr<unsigned int> pinStringVrs = &args->StringValueRefs[0];
memcpy_s(pinStringVrs, args->StringValueRefs->Length, values.stringValueRefs.data(), values.stringValueRefs.size());
args->StringValues = gcnew array<String^>(static_cast<int>(values.stringValues.size()));
for (int i = 0; i < args->StringValues->Length; i++)
{
args->StringValues[i] = marshal_as<String^>(values.stringValues[i]);
}
// Fire!
NewValuesArrived(this, args);
}
void FrontendRpc::onLog(std::string instanceName, int status, std::string message)
{
auto args = gcnew LogEventArgs();
args->InstanceName = marshal_as<String^>(instanceName);
args->Status = status;
args->Message = marshal_as<String^>(message);
LogArrived(this, args);
}
}
\ No newline at end of file
#pragma once
// Faster build by not incuding all of windows
#ifndef VC_EXTRALEAN
#define VC_EXTRALEAN
#endif
#include <windows.h> // Always on top otherwise build fails (IServicProvider CLI issue)
#include "../ModeliRpcNative/IRpcFrontend.h"
#include <string>
#include "NewValuesEventArgs.h"
#include "LogEventArgs.h"
#include "RpcChannelLink.h"
using namespace System;
typedef IRpcFrontend* (*createRpcFrontendType)();
namespace capnp
{
class EzRpcClient;
}
namespace ModeliRpc
{
ref class FrontendRpc
{
private:
// Unmanaged rpc interface
IRpcFrontend * _rpcFrontend;
// The native project exports a dll to hide the rpc framework
HMODULE _rpcDll;
// Delegates for callbacks
delegate void NewValuesDelegate(double timestamp, ValuesStruct values);
delegate void LogDelegate(std::string instanceName, int status, std::string message);
NewValuesDelegate^ _newValues;
LogDelegate^ _log;
// Functions for the delegates
void onNewValues(double timestamp, ValuesStruct values);
void onLog(std::string instanceName, int status, std::string message);
public:
/// Create a new managed instance for RPCs to the ModeliBackend.
FrontendRpc(String^ address, int port);
~FrontendRpc(); // Destructor (IDisposable)
!FrontendRpc(); // Finalizer
/// Gets fired when new values arrived from the backend.
event EventHandler<NewValuesEventArgs^>^ NewValuesArrived;
/// Gets fired when logging messages arrive from the backend.
event EventHandler<LogEventArgs^>^ LogArrived;
/// Play the simulation, returns a fmi2Status
int Play();
/// Fast forward the simulation, returns a fmi2Status
int PlayFast(double timeToPlay);
/// Pause the simulation without resetting it
void Pause();
/// Stop & reset the simulation, returns a fmi2Status
int Stop();
/// Add a fmu to the simulation, returns false on fail
bool AddFmu(String^ instanceName, array<Byte>^ fmuFileBuffer);
/// Remove a fmu to the simulation, returns false on fail
bool RemoveFmu(String^ instanceName);
/// Add a ChannelLink to the simulation, returns false on fail
bool AddChannelLink(RpcChannelLink^ channelLink);
/// Remove a ChannelLink from the simulation, returns false on fail
bool RemoveChannelLink(RpcChannelLink^ channelLink);
/// Set values in the simulation, retruns a fmi2Status
int SetValues(String^ instanceName,
array<unsigned int>^ intVRs, array<int>^ intValues,
array<unsigned int>^ realVRs, array<double>^ realValues,
array<unsigned int>^ boolVRs, array<int>^ boolValues, // Fmi2Bool = int
array<unsigned int>^ stringVRs, array<String^>^ stringValues);
};
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" 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>15.0</VCProjectVersion>
<ProjectGuid>{A8187A41-1D24-438F-9B5D-0F7BF270130E}</ProjectGuid>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<Keyword>ManagedCProj</Keyword>
<RootNamespace>ModeliRpcCLR</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CLRSupport>true</CLRSupport>
<CharacterSet>NotSet</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared" />
<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)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="LogEventArgs.h" />
<ClInclude Include="ModeliRpc.h" />
<ClInclude Include="NewValuesEventArgs.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="RpcChannelLink.h" />
<ClInclude Include="Stdafx.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp" />
<ClCompile Include="LogEventArgs.cpp" />
<ClCompile Include="ModeliRpc.cpp" />
<ClCompile Include="NewValuesEventArgs.cpp" />
<ClCompile Include="RpcChannelLink.cpp" />
<ClCompile Include="Stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="app.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<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>
<ClInclude Include="Stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ModeliRpc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="NewValuesEventArgs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="LogEventArgs.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RpcChannelLink.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ModeliRpc.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="NewValuesEventArgs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="LogEventArgs.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RpcChannelLink.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="app.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>
\ No newline at end of file
#include "stdafx.h"
#include "NewValuesEventArgs.h"
NewValuesEventArgs::NewValuesEventArgs()
{
}
#pragma once
using namespace System;
ref class NewValuesEventArgs: EventArgs
{
public:
NewValuesEventArgs();
property double Timestamp;
property String^ InstanceName;
property array<unsigned int>^ IntegerValueRefs;
property array<int>^ IntegerValues;
property array<unsigned int>^ RealValueRefs;
property array<double>^ RealValues;
property array<unsigned int>^ BoolValueRefs;
property array<int>^ BoolValues;
property array<unsigned int>^ StringValueRefs;
property array<String^>^ StringValues;
};
========================================================================
DYNAMIC LINK LIBRARY : ModeliRpcCLR Project Overview
========================================================================
AppWizard has created this ModeliRpcCLR DLL for you.
This file contains a summary of what you will find in each of the files that
make up your ModeliRpcCLR application.
ModeliRpcCLR.vcxproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
ModeliRpcCLR.vcxproj.filters
This is the filters file for VC++ projects generated using an Application Wizard.
It contains information about the association between the files in your project
and the filters. This association is used in the IDE to show grouping of files with
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
"Source Files" filter).
ModeliRpcCLR.cpp
This is the main DLL source file.
ModeliRpcCLR.h
This file contains a class declaration.
AssemblyInfo.cpp
Contains custom attributes for modifying assembly metadata.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "RpcChannelLink.h"
RpcChannelLink::RpcChannelLink()
{
}
#pragma once
using namespace System;
ref class RpcChannelLink
{
public:
RpcChannelLink();
property String^ MasterInstanceName;
property String^ SlaveInstanceName;
property unsigned int MasterValueRef;
property unsigned int SlaveValueRef;
property double Factor;
property double Offset;
};
// stdafx.cpp : source file that includes just the standard includes
// ModeliRpcCLR.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once
ModeliRpc/ModeliRpcCLR/app.ico

40.4 KiB

File suppressed by a .gitattributes entry or the file's encoding is unsupported.
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by app.rc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment