Commit 322f562f authored by Artem Prilutskiy's avatar Artem Prilutskiy

..

parent 14fe868d
......@@ -54,7 +54,7 @@ int main(int argc, char* argv[])
{ "client-number", required_argument, NULL, 'c' },
{ "server-address", required_argument, NULL, 's' },
{ "server-port", required_argument, NULL, 'p' },
{ "source-id", required_argument, NULL, 'i' },
{ "source-id", required_argument, NULL, 'u' },
{ "group-id", required_argument, NULL, 'g' },
{ "talker-alias", required_argument, NULL, 't' },
{ NULL, 0, NULL, 0 }
......@@ -64,7 +64,7 @@ int main(int argc, char* argv[])
int control = 0;
int selection = 0;
while ((selection = getopt_long(argc, argv, "w:c:s:p:i:g:t:", options, NULL)) != EOF)
while ((selection = getopt_long(argc, argv, "w:c:s:p:u:g:t:", options, NULL)) != EOF)
switch (selection)
{
case 'w':
......@@ -86,7 +86,7 @@ int main(int argc, char* argv[])
control |= 0b00100;
break;
case 'i':
case 'u':
value = strtol(optarg, NULL, 10);
if (value > 0)
{
......@@ -187,18 +187,22 @@ int main(int argc, char* argv[])
uint64_t mark;
size_t count = 0;
uint8_t* pointer;
uint8_t* limit = buffer + 3 * DSD_AMBE_CHUNK_SIZE;
// Wait for timer event (60 milliseconds)
while (read(handle, &mark, sizeof(uint64_t)) > 0)
{
// Read AMBE chunks of DSD format
// Read AMBE chunks in DSD format
ssize_t length1 = read(STDIN_FILENO, buffer + 0 * DSD_AMBE_CHUNK_SIZE, DSD_AMBE_CHUNK_SIZE);
ssize_t length2 = read(STDIN_FILENO, buffer + 1 * DSD_AMBE_CHUNK_SIZE, DSD_AMBE_CHUNK_SIZE);
ssize_t length3 = read(STDIN_FILENO, buffer + 2 * DSD_AMBE_CHUNK_SIZE, DSD_AMBE_CHUNK_SIZE);
pointer = buffer;
while ((pointer < limit) &&
(read(STDIN_FILENO, pointer, DSD_AMBE_CHUNK_SIZE) == DSD_AMBE_CHUNK_SIZE))
{
pointer += DSD_AMBE_CHUNK_SIZE;
}
if ((length1 != DSD_AMBE_CHUNK_SIZE) ||
(length2 != DSD_AMBE_CHUNK_SIZE) ||
(length3 != DSD_AMBE_CHUNK_SIZE))
if (pointer < limit)
{
printf("Input data stream stopped\n");
break;
......
......@@ -109,7 +109,7 @@ struct RewindContext* CreateRewindContext(uint32_t number, const char* verion)
return NULL;
}
// Create supplimentary data
// Create supplementary data
uname(&name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment