From f2dbd1cc2948f4a52e952f2b10c5ac8bca10dba6 Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周二, 19 8月 2014 21:19:22 +0800
Subject: [PATCH] Add support for matching number suffix

---
 examples/common/scpi-def.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/examples/common/scpi-def.c b/examples/common/scpi-def.c
index 3a863c9..9e3cc5d 100644
--- a/examples/common/scpi-def.c
+++ b/examples/common/scpi-def.c
@@ -154,6 +154,13 @@
     return SCPI_RES_OK;
 }
 
+scpi_result_t TEST_Numbers(scpi_t * context) {
+
+    fprintf(stderr, "RAW CMD %.*s\r\n", (int)context->paramlist.cmd_raw.length, context->paramlist.cmd_raw.data);
+
+    return SCPI_RES_OK;
+}
+
 static const scpi_command_t scpi_commands[] = {
     /* IEEE Mandated Commands (SCPI std V1999.0 4.1.1) */
     { .pattern = "*CLS", .callback = SCPI_CoreCls,},
@@ -204,6 +211,7 @@
 
     {.pattern = "TEST:BOOL", .callback = TEST_Bool,},
     {.pattern = "TEST:CHOice?", .callback = TEST_ChoiceQ,},
+    {.pattern = "TEST#:NUMbers#", .callback = TEST_Numbers,},
 
     SCPI_CMD_LIST_END
 };

--
Gitblit v1.9.1