
56
Developing a LonWorks Router
Example Neuron C Source
This section shows an example Neuron C file for Router 5000 development. This
file primarily controls the router’s buffering, but it also contains important
declarations to set up the parallel IO configuration and explicit addressing.
//
// Copyright (c) 2011 by Echelon Corporation.
// All Rights Reserved.
#include <control.h>
#include <msg_addr.h>
// Basic application configuration space:
#pragma num_domain_entries
2
#pragma num_alias_table_entries 0
#pragma receive_trans_count
3
#pragma disable_snvt_si
#pragma run_unconfigured
// Router buffer configurations: APP
#pragma app_buf_out_size
42
#pragma app_buf_in_size
42
#pragma app_buf_out_count
1
#pragma app_buf_in_count
2
// Router buffer configurations: NET
#pragma net_buf_out_size
255
#pragma net_buf_in_size
255
#pragma net_buf_in_count
7
#pragma net_buf_out_count
7
#pragma app_buf_out_priority_count 1
#pragma net_buf_out_priority_count 2
// This pad covers the router EE data.
const unsigned int code_pad[200] = {0};
// Make some room for router configurations
#pragma num_addr_table_entries 15
// Force explicit addressing on by referencing a dummy
// message address
// This code never actually runs.
// Don't use #pragma micro_interface for routers because
// setting that bit causes SI data issues with installers.
// Place this code AFTER code_pad[].
msg_tag NMtag;
void send_msg_dummy(void) {
msg_out.tag = NMtag;
msg_out.dest_addr.snode.type = SUBNET_NODE;
msg_send();
}
IO_0 parallel slave pios1;
Содержание 14315R
Страница 1: ...LONWORKS Router User s Guide 078 0018 01E...
Страница 6: ......
Страница 9: ...Appendix A Communications Parameters for LonWorks Routers 81 Communications Parameters 82...
Страница 10: ......
Страница 48: ......
Страница 53: ...LonWorks Router User s Guide 43 Figure 22 Router 5000 Mechanical Specifications...
Страница 54: ......
Страница 57: ...LonWorks Router User s Guide 47 Figure 23 RTR 10 Motherboard Example Schematic...
Страница 61: ...LonWorks Router User s Guide 51 Figure 26 Router 5000 Motherboard Example Schematic Core...
Страница 62: ...52 Developing a LonWorks Router Figure 27 Router 5000 Motherboard Example Schematic Network...
Страница 68: ......
Страница 80: ......
Страница 99: ...www echelon com...