• AVR Freaks

AnsweredHot!Dynamic variables http print issue

Page: < 12 Showing page 2 of 2
Starting Member
  • Total Posts : 38
  • Reward points : 0
  • Joined: 2013/12/06 03:20:35
  • Location: 0
  • Status: offline
Re: Dynamic variables http print issue 2020/07/23 03:28:47 (permalink)
@freebsd - Did you review my post that the latest version of the software returns strings with the " quotation marks included? Is this intended or anavoidable?
Within the stack:
vDcpt->dynArgs->argType returns TCPIP_HTTP_DYN_ARG_TYPE_STRING correctly
vDcpt->dynArgs->argStr returns "1400" not 1400 (both strings)
String comparisons then fail owing to the " characters in the strings
  • Total Posts : 1442
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: online
Re: Dynamic variables http print issue 2020/07/23 04:39:50 (permalink)
4 (1)
@Chris79 - currently the format of the dynamic variable is '~var(args)~'.
There is no extra parameter/form to specify that an specific argument like '1400' is meant to be string and not int.
In most of the situations I think that works fine, as there should not be conflict between numbers and strings.
If you need to handle the same string of chars '1400' as either an int or string, then you need to handle in that particular handler:
- if you get an int but you know that's supposed to be a string, just convert it
- or, if you get extra '"' chars, just get rid of them.
Without changing the variable format, I don't think there's much we can do.
If you have a suggestion of how the parser to better decide between a number and a string, please share your thoughts.
P.S. As a workaround, a configuration for the parser could be added to remove automatically the " chars from strings. Probably better even, a list of characters that should be removed.
post edited by rainad - 2020/07/23 08:56:22
Super Member
  • Total Posts : 163
  • Reward points : 0
  • Joined: 2011/03/07 04:15:29
  • Location: 0
  • Status: offline
Re: Dynamic variables http print issue 2020/07/23 08:27:17 (permalink)
 I cannot find anything in the documentation for the mpfs utility that describes the differences. 

P.S - Link to the documentation details - 
MPFS Utilitympfs.jar renamed to mpfs_net.jarMPFS Utilitympfs_net.jar utility will generate a MPFS_Net_SettingDetails.xml file for the configuration backup 
mpfs.jar- This tool updates and replaces the existent mpfs2.jar.
- The new MPFS utility version 3.3.3 is capable of parsing SSI directives.
- The utility is intended to be used with the HTTP_NET server.
- It generates the http_net_print.h and http_net_print.c files.
- HTTP_Net Application initialization and HTTP registration are now part of http_net_print.c file.
- The tool has been updated to disable the default compression of html files.
- When the application Custom Template is enabled, the Web pages are added to the project.
- The Source directory path is the source of the web page files.
- The Destination directory path is the location where the web page files will be copied.
- The Destination location is not currently configurable.
- The maximum number of supported web page files is currently 100.
- The NVM MPFS demos use a customized pre-build step to generate the mpfs_net_img.c file:
java -jar ../../../../utilities/mpfs_generator/mpfs.jar /c /z "snmp.bib" "../src/web_pages" "../src" "mpfs_net_img.c"
- If there is no JRE installed on the building machine, the project will not build. The pre-build step needs to be disabled manually
Page: < 12 Showing page 2 of 2
Jump to:
© 2021 APG vNext Commercial Version 4.5