aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2017-02-05 08:36:51 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2017-02-18 21:02:47 +0100
commit0611f62b52580fd9ae275019d8a0211e98746a6a (patch)
treefd14bc801e528a3255c4234dd20b8e9cdd43403d /src
parent5f1d7bc9705cf31f55cd802ba616f42a92da3618 (diff)
Show channel number and basic info when channel was created
Diffstat (limited to 'src')
-rw-r--r--src/amps/amps.c2
-rw-r--r--src/anetz/anetz.c2
-rw-r--r--src/bnetz/bnetz.c3
-rw-r--r--src/cnetz/cnetz.c12
-rw-r--r--src/nmt/nmt.c41
5 files changed, 35 insertions, 25 deletions
diff --git a/src/amps/amps.c b/src/amps/amps.c
index 133666f..fadedbc 100644
--- a/src/amps/amps.c
+++ b/src/amps/amps.c
@@ -480,6 +480,8 @@ int amps_create(int channel, enum amps_chan_type chan_type, const char *audiodev
amps_new_state(amps, STATE_BUSY);
#endif
+ PDEBUG(DAMPS, DEBUG_NOTICE, "Created channel #%d of type '%s' = %s\n", channel, chan_type_short_name(chan_type), chan_type_long_name(chan_type));
+
return 0;
error:
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index c65d6f1..094a75f 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -206,6 +206,8 @@ int anetz_create(int kanal, const char *audiodev, int samplerate, double rx_gain
/* go into idle state */
anetz_go_idle(anetz);
+ PDEBUG(DANETZ, DEBUG_NOTICE, "Created 'Kanal' #%d\n", kanal);
+
return 0;
error:
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index d6f7b1f..4930f4e 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -226,6 +226,9 @@ error_paging:
/* go into idle state */
bnetz_go_idle(bnetz);
+ PDEBUG(DBNETZ, DEBUG_NOTICE, "Created 'Kanal' #%d\n", kanal);
+ PDEBUG(DBNETZ, DEBUG_NOTICE, " -> Using station ID (Gruppenfreisignal) %d\n", gfs);
+
return 0;
error:
diff --git a/src/cnetz/cnetz.c b/src/cnetz/cnetz.c
index 8413549..6c666c9 100644
--- a/src/cnetz/cnetz.c
+++ b/src/cnetz/cnetz.c
@@ -365,6 +365,8 @@ int cnetz_create(int kanal, enum cnetz_chan_type chan_type, const char *audiodev
cnetz_flush_other_transactions(cnetz, trans2);
#endif
+ PDEBUG(DCNETZ, DEBUG_NOTICE, "Created 'Kanal' #%d of type '%s' = %s\n", kanal, chan_type_short_name(chan_type), chan_type_long_name(chan_type));
+
return 0;
error:
@@ -678,9 +680,9 @@ static struct cnetz_channels {
const char *short_name;
const char *long_name;
} cnetz_channels[] = {
- { CHAN_TYPE_OGK_SPK, "OgK/SpK","combined calling & traffic channel" },
- { CHAN_TYPE_OGK, "OgK", "calling channel" },
- { CHAN_TYPE_SPK, "SpK", "traffic channel" },
+ { CHAN_TYPE_OGK_SPK, "OgK/SpK","combined control & voice channel" },
+ { CHAN_TYPE_OGK, "OgK", "control channel" },
+ { CHAN_TYPE_SPK, "SpK", "voice channel" },
{ 0, NULL, NULL }
};
@@ -699,10 +701,8 @@ int cnetz_channel_by_short_name(const char *short_name)
int i;
for (i = 0; cnetz_channels[i].short_name; i++) {
- if (!strcasecmp(cnetz_channels[i].short_name, short_name)) {
- PDEBUG(DCNETZ, DEBUG_INFO, "Selecting channel '%s' = %s\n", cnetz_channels[i].short_name, cnetz_channels[i].long_name);
+ if (!strcasecmp(cnetz_channels[i].short_name, short_name))
return cnetz_channels[i].chan_type;
- }
}
return -1;
diff --git a/src/nmt/nmt.c b/src/nmt/nmt.c
index 8f22d69..71160b9 100644
--- a/src/nmt/nmt.c
+++ b/src/nmt/nmt.c
@@ -123,9 +123,9 @@ static struct nmt_channels {
const char *short_name;
const char *long_name;
} nmt_channels[] = {
- { CHAN_TYPE_CC, "CC", "calling channel" },
- { CHAN_TYPE_TC, "TC", "traffic channel" },
- { CHAN_TYPE_CC_TC, "CC/TC","combined calling & traffic channel" },
+ { CHAN_TYPE_CC, "CC", "calling channel (incomming calls)" },
+ { CHAN_TYPE_TC, "TC", "traffic channel (outgoing calls)" },
+ { CHAN_TYPE_CC_TC, "CC/TC","combined calling & traffic channel (both way calls)" },
{ CHAN_TYPE_TEST, "TEST", "test channel" },
{ 0, NULL, NULL }
};
@@ -145,10 +145,8 @@ int nmt_channel_by_short_name(const char *short_name)
int i;
for (i = 0; nmt_channels[i].short_name; i++) {
- if (!strcasecmp(nmt_channels[i].short_name, short_name)) {
- PDEBUG(DNMT, DEBUG_INFO, "Selecting channel '%s' = %s\n", nmt_channels[i].short_name, nmt_channels[i].long_name);
+ if (!strcasecmp(nmt_channels[i].short_name, short_name))
return nmt_channels[i].chan_type;
- }
}
return -1;
@@ -292,10 +290,8 @@ uint8_t nmt_country_by_short_name(const char *short_name)
int i;
for (i = 0; nmt_country[i].short_name; i++) {
- if (!strcasecmp(nmt_country[i].short_name, short_name)) {
- PDEBUG(DNMT, DEBUG_INFO, "Selecting country code %d of %s,%s (provider '%s')\n", nmt_country[i].y, nmt_country[i].short_name, nmt_country[i].long_name, nmt_country[i].provider_name);
+ if (!strcasecmp(nmt_country[i].short_name, short_name))
return nmt_country[i].y;
- }
}
return 0;
@@ -341,6 +337,16 @@ int nmt_create(int channel, enum nmt_chan_type chan_type, const char *audiodev,
goto error;
}
+ timer_init(&nmt->timer, nmt_timeout, nmt);
+ nmt->sysinfo.chan_type = chan_type;
+ nmt->sysinfo.ms_power = ms_power;
+ nmt->sysinfo.traffic_area = traffic_area;
+ nmt->sysinfo.area_no = area_no;
+ nmt->compandor = compandor;
+ nmt->supervisory = supervisory;
+ nmt->send_callerid = send_callerid;
+ strncpy(nmt->smsc_number, smsc_number, sizeof(nmt->smsc_number) - 1);
+
/* init audio processing */
rc = dsp_init_sender(nmt);
if (rc < 0) {
@@ -362,19 +368,16 @@ int nmt_create(int channel, enum nmt_chan_type chan_type, const char *audiodev,
goto error;
}
- timer_init(&nmt->timer, nmt_timeout, nmt);
- nmt->sysinfo.chan_type = chan_type;
- nmt->sysinfo.ms_power = ms_power;
- nmt->sysinfo.traffic_area = traffic_area;
- nmt->sysinfo.area_no = area_no;
- nmt->compandor = compandor;
- nmt->supervisory = supervisory;
- nmt->send_callerid = send_callerid;
- strncpy(nmt->smsc_number, smsc_number, sizeof(nmt->smsc_number) - 1);
-
/* go into idle state */
nmt_go_idle(nmt);
+ PDEBUG(DNMT, DEBUG_NOTICE, "Created channel #%d of type '%s' = %s\n", channel, chan_type_short_name(chan_type), chan_type_long_name(chan_type));
+ PDEBUG(DNMT, DEBUG_NOTICE, " -> Using traffic area %d,%d and area no %d\n", traffic_area >> 4, (traffic_area & 0xf) % 10, area_no);
+ if (nmt->supervisory)
+ PDEBUG(DNMT, DEBUG_NOTICE, " -> Using supervisory signal %d\n", supervisory);
+ else
+ PDEBUG(DNMT, DEBUG_NOTICE, " -> Using no supervisory signal\n");
+
return 0;
error: