本文整理汇总了C#中InstanceHandle类的典型用法代码示例。如果您正苦于以下问题:C# InstanceHandle类的具体用法?C# InstanceHandle怎么用?C# InstanceHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InstanceHandle类属于命名空间,在下文中一共展示了InstanceHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: read_next_instance_w_condition
public static extern ReturnCode read_next_instance_w_condition(
IntPtr _this,
IntPtr data_values,
IntPtr info_seq,
int max_samples,
InstanceHandle a_handle,
IntPtr a_condition);
示例2: NewChange
internal CacheChange NewChange(ChangeKind kind, Data data, InstanceHandle instance)
{
var change = new CacheChange()
{
WriterGuid = Id,
SequenceNumber = SequenceNumber.Increment(),
Kind = kind,
InstanceHandle = instance,
Data = data
};
var message = new Message()
{
Header = new Header()
{
Protocol = ProtocolId.ProtocolRTPS,
Version = ProtocolVersion.v22,
Vendor = VendorId.Unknown,
GuidPrefix = new GuidPrefix()
}
};
message.AddSubMessage(new DataSubMessage(data));
message.AddSubMessage(new HeartbeatSubMessage());
Channel.Send(message);
return change;
}
示例3: read_next_instance
public static extern ReturnCode read_next_instance(
IntPtr _this,
IntPtr data_values,
IntPtr info_seq,
int max_samples,
InstanceHandle a_handle,
SampleStateKind sample_states,
ViewStateKind view_states,
InstanceStateKind instance_states);
示例4: GetKeyValue
public static ReturnCode GetKeyValue(
DataReader reader,
ref object key,
InstanceHandle instanceHandle)
{
GCHandle tmpGCHandleData = GCHandle.Alloc(key, GCHandleType.Normal);
ReturnCode result = Gapi.FooDataReader.get_key_value(
reader.GapiPeer,
GCHandle.ToIntPtr(tmpGCHandleData),
instanceHandle);
tmpGCHandleData.Free();
return result;
}
示例5: Dispose
public static ReturnCode Dispose(
DataWriter writer,
object instanceData,
InstanceHandle instanceHandle)
{
GCHandle tmpGCHandle = GCHandle.Alloc(instanceData, GCHandleType.Normal);
ReturnCode result = Gapi.FooDataWriter.dispose(
writer.GapiPeer,
GCHandle.ToIntPtr(tmpGCHandle),
instanceHandle);
tmpGCHandle.Free();
return result;
}
示例6: DisposeWithTimestamp
public static ReturnCode DisposeWithTimestamp(
DataWriter writer,
object instanceData,
InstanceHandle instanceHandle,
Time sourceTimestamp)
{
GCHandle tmpGCHandle = GCHandle.Alloc(instanceData, GCHandleType.Normal);
ReturnCode result = Gapi.FooDataWriter.dispose_w_timestamp(
writer.GapiPeer,
GCHandle.ToIntPtr(tmpGCHandle),
instanceHandle,
ref sourceTimestamp);
tmpGCHandle.Free();
return result;
}
示例7: AddReference
public void AddReference(InstanceHandle handle)
{
if (referenceList.ContainsKey(handle.Instance))
return;
referenceList.Add(handle.Instance, handle);
handle.MarkReferredBy(this);
}
示例8: RemoveReference
public void RemoveReference(InstanceHandle handle)
{
if (referenceList.ContainsKey(handle.Instance))
{
referenceList.Remove(handle.Instance);
handle.UnmarkReferredBy(this);
}
}
示例9: Cancel
internal void Cancel()
{
Fx.Assert(InstanceHandle != null, "InstanceHandleReference already cancelled.");
InstanceHandle = null;
}
示例10: RemoveHandle
private void RemoveHandle(InstanceHandle handle)
{
Items.Remove(handle);
foreach (var item in handle.referredList.Values.ToArray())
item.RemoveReference(handle);
foreach (var item in handle.referenceList.Values.ToArray())
item.UnmarkReferredBy(handle);
}
示例11: contains_entity
public static extern byte contains_entity(
IntPtr _this,
InstanceHandle a_handle);
示例12: InstanceHandleReference
internal InstanceHandleReference(InstanceHandle instanceHandle)
{
Fx.Assert(instanceHandle != null, "Null instanceHandle provided to InstanceHandleReference.");
InstanceHandle = instanceHandle;
}
示例13: TakeNextInstanceWithCondition
public static ReturnCode TakeNextInstanceWithCondition(
DataReader reader,
ref object[] data,
ref SampleInfo[] sampleInfos,
int maxSamples,
InstanceHandle instanceHandle,
IReadCondition condition)
{
ReturnCode result = ReturnCode.Ok;
using (DataReaderMarshaler marshaler =
new DataReaderMarshaler(data, sampleInfos, ref maxSamples, ref result))
{
if (result == ReturnCode.Ok)
{
result = Gapi.FooDataReader.take_next_instance_w_condition(
reader.GapiPeer,
marshaler.dataValuesPtr,
marshaler.sampleInfosPtr,
maxSamples,
instanceHandle,
((ReadCondition)condition).GapiPeer);
marshaler.CopyOut(ref data, ref sampleInfos);
}
}
return result;
}
示例14: get_discovered_participant_data
public static extern ReturnCode get_discovered_participant_data(
IntPtr _this,
IntPtr participant_data,
InstanceHandle handle);
示例15: get_matched_publication_data
public static extern ReturnCode get_matched_publication_data(
IntPtr _this,
IntPtr publication_data,
InstanceHandle publication_handle);