Transformer SDK For C
6.2.11.309924
|
Macros | |
#define | NEWS_AUTHSTR_FIELDNUM 5 |
Definition of the authorisation string field number. More... | |
#define | NEWS_COMPANY_CODE_FIELDNUM 102 |
Definition of the company code field number. More... | |
#define | NEWS_DATETIME_FIELDNUM 2 |
Definition of the date time field number. More... | |
#define | NEWS_HEADLINE_FIELDNUM 0 |
Definition of the headline field number. More... | |
#define | NEWS_PRODUCT_CODE_FIELDNUM 100 |
Definition of the product code field number. More... | |
#define | NEWS_STORYCODE_FIELDNUM 1 |
Definition of the storycode field number. More... | |
#define | NEWS_TOPIC_CODE_FIELDNUM 101 |
Definition of the topic code field number. More... | |
#define | NEWS_USER_CODE_FIELDNUM 200 |
Definition of the user code starting field number. More... | |
#define | NEWS_USER_CODE_MAX 10 |
Maximum number of user codes. More... | |
Both news stories and headlines may be streamed. Conventionally, the streaming of stories has been thought not to have been beneficial. However, if the data can be arranged such that story corrections are transmitted on the same symbol names as the original story, then the end user will obtain an updated story without having to re-request the story. This is particularly useful for news articles that provide market summaries.
A news headline update should contain as a minimum the headline of the the story and the time of the story. To uniquely identify the story a story code should be added using the ds_add_news_storycode() function.
To facilitate efficient story searching, topic codes can be added to the headline update using the ds_add_news_product_code(), ds_add_news_topic_code() and ds_add_news_user_code() functions.
Example: Send to all interested peers a news headline on the /NEWS symbol and store the headline in the cache.
\par Publishing News Stories
Depending on your data requirements, stories may be sent to the Liberator as either broadcast (using the F_NONACTIVE flag), or active.
Story updates should be created using ds_init_data() with the DS_STORY_TYPE object type flag. These updates contain a single field with the fieldnumber 0 which contains the story text.
The story text may be broken across multiple datasource update packets, to indicate that a subsequent update is a continuation and not a replacement, the text should be inserted with the fieldnumber 1.
Example: Send a complete story in one datasource packet.
Example: Send a story in a multiple datasource packets.
Example: Send a story and then send a correction.
#define NEWS_AUTHSTR_FIELDNUM 5 |
Definition of the authorisation string field number.
#define NEWS_COMPANY_CODE_FIELDNUM 102 |
Definition of the company code field number.
#define NEWS_DATETIME_FIELDNUM 2 |
Definition of the date time field number.
#define NEWS_HEADLINE_FIELDNUM 0 |
Definition of the headline field number.
#define NEWS_PRODUCT_CODE_FIELDNUM 100 |
Definition of the product code field number.
#define NEWS_STORYCODE_FIELDNUM 1 |
Definition of the storycode field number.
#define NEWS_TOPIC_CODE_FIELDNUM 101 |
Definition of the topic code field number.
#define NEWS_USER_CODE_FIELDNUM 200 |
Definition of the user code starting field number.
#define NEWS_USER_CODE_MAX 10 |
Maximum number of user codes.