diff --git a/vortex-web-client/vortex-web-client-tests.ts b/vortex-web-client/vortex-web-client-tests.ts index 216e268c5e..bf6f72bbc2 100644 --- a/vortex-web-client/vortex-web-client-tests.ts +++ b/vortex-web-client/vortex-web-client-tests.ts @@ -7,7 +7,7 @@ var tqos = new dds.TopicQos(); var chatTopic = new dds.Topic(0, 'ChatMessage', tqos); runtime.registerTopic(chatTopic); -var writerQos = new dds.DataWriterQos(); +var writerQos = new dds.DataWriterQos(dds.Partition("chatroom"), dds.Reliability.Reliable, dds.Durability.Persistent); var writer = new dds.DataWriter(runtime, chatTopic, writerQos); writer.write({ @@ -15,7 +15,7 @@ writer.write({ msg : "Hello World!" }); -var readerQos = new dds.DataReaderQos(); +var readerQos = new dds.DataReaderQos(dds.Partition("chatroom"), dds.Reliability.Reliable, dds.Durability.Persistent); var reader = new dds.DataReader(runtime, chatTopic, readerQos); reader.addListener(function(msg) { diff --git a/vortex-web-client/vortex-web-client.d.ts b/vortex-web-client/vortex-web-client.d.ts index bb038a6bd6..b432eff3f0 100644 --- a/vortex-web-client/vortex-web-client.d.ts +++ b/vortex-web-client/vortex-web-client.d.ts @@ -39,11 +39,11 @@ declare module DDS { /** * KeepAll - KEEP_ALL qos policy */ - KeepAll:any; + static KeepAll:any; /** * KeepLast - KEEP_LAST qos policy */ - KeepLast:any; + static KeepLast:any; } /** @@ -62,51 +62,37 @@ declare module DDS { /** * Reliable - 'Reliable' reliability policy */ - Reliable:any; + static Reliable:any; /** * BestEffort - 'BestEffort' reliability policy */ - BestEffort:any; + static BestEffort:any; } /** - * Partition policy + * Create new partition policy + * + * @param policies - partition names + * @example var qos = Partition('p1', 'p2') */ - export class Partition implements Policy { - /** - * Create new partition policy - * - * @param policies - partition names - * @example var qos = Partition('p1', 'p2') - */ - constructor(...policies:string[]); - } + export function Partition(...policies:string[]):Policy; /** - * Content Filter policy + * Create new content filter policy + * + * @param expr - filter expression + * @example var filter = ContentFilter("x>10 AND y<50") */ - export class ContentFilter implements Policy { - /** - * Create new content filter policy - * - * @param expr - filter expression - * @example var filter = ContentFilter("x>10 AND y<50") - */ - constructor(expr:string); - } + export function ContentFilter(expr:string):Policy; + /** - * Time Filter policy + * Create new time filter policy + * + * @param period - time duration (unit ?) + * @example var filter = TimeFilter(100) */ - export class TimeFilter implements Policy { - /** - * Create new content filter policy - * - * @param period - time duration (unit ?) - * @example var filter = TimeFilter(100) - */ - constructor(period:number); - } + export function TimeFilter(period:number):Policy; /** * Durability Policy @@ -125,19 +111,19 @@ declare module DDS { /** * Volatile - Volatile durability policy */ - Volatile:any; + static Volatile:any; /** * TransientLocal - TransientLocal durability policy */ - TransientLocal:any; + static TransientLocal:any; /** * Transient - Transient durability policy */ - Transient:any; + static Transient:any; /** * Persistent - Persistent durability policy */ - Persistent:any; + static Persistent:any; } @@ -473,7 +459,7 @@ declare module DDS { export var runtime:{ Runtime : Runtime; - } + }; export var VERSION:string; }