ロボット、千葉ロッテマリーンズについていいかげんなことを書きます。
×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
OpenRTM.NETは.NETフレームワーク上で動作するので,F#からでも使えるはずです.
OpenRTM.NETはここからダウンロードできます.
簡単なサンプルを作ってみました.
ソースはこんな感じ.
#I @"C:\Program Files\SEC\OpenRTM.NET\bin";
#r "OpenRTM.Core.dll";
#r "OpenRTM.Extension.dll";
#r "OpenRTM.IIOP.dll";
#r "OpenRTM.WCF.dll";
#light
open OpenRTM.Core;
open OpenRTM.Extension;
open System;
open System.Collections.Generic;
open System.Linq;
open System.Text
[<Component(Category = "Examples", Name = "Sample")>]
[<DetailProfile(
ActivityType = "DataFlowComponent",
Description = "Hello World Component",
Language = "F#",
LanguageType = "Compile",
MaxInstance = 10,
Vendor = "Nobu",
Version = "1.0.0")>]
[<CustomProfile("CreationDate", "2010/11/20")>]
type Sample() as x =
inherit DataFlowComponent()
override x.OnExecute(exec_handle) =
Console.WriteLine("Hello World");
ReturnCode_t.RTC_OK;
let main() =
let manager = new Manager()
manager.Activate();
let comp = manager.CreateComponent("Sample");
comp.GetComponentProfile().Display();
manager.Run();
do main()
F#も悪くないかも.
にほんブログ村
OpenRTM.NETはここからダウンロードできます.
簡単なサンプルを作ってみました.
ソースはこんな感じ.
#I @"C:\Program Files\SEC\OpenRTM.NET\bin";
#r "OpenRTM.Core.dll";
#r "OpenRTM.Extension.dll";
#r "OpenRTM.IIOP.dll";
#r "OpenRTM.WCF.dll";
#light
open OpenRTM.Core;
open OpenRTM.Extension;
open System;
open System.Collections.Generic;
open System.Linq;
open System.Text
[<Component(Category = "Examples", Name = "Sample")>]
[<DetailProfile(
ActivityType = "DataFlowComponent",
Description = "Hello World Component",
Language = "F#",
LanguageType = "Compile",
MaxInstance = 10,
Vendor = "Nobu",
Version = "1.0.0")>]
[<CustomProfile("CreationDate", "2010/11/20")>]
type Sample() as x =
inherit DataFlowComponent()
override x.OnExecute(exec_handle) =
Console.WriteLine("Hello World");
ReturnCode_t.RTC_OK;
let main() =
let manager = new Manager()
manager.Activate();
let comp = manager.CreateComponent("Sample");
comp.GetComponentProfile().Display();
manager.Run();
do main()
F#も悪くないかも.
にほんブログ村
PR
この記事にコメントする