Click here to Skip to main content
15,912,977 members

Comments by Davidscott59 (Top 7 by date)

Davidscott59 3-Jul-11 12:31pm View    
Thanks, I will give this a try. FYI, I can do all of this via python in about half the amount of code it takes with C#. I may stick with the python...
Davidscott59 1-Jul-11 15:41pm View    
I am writing it in a winform app. Once the "user" (test engineer) inputs the IP address, password, and username, he will then select something like "start test" button. From there on, the program runs in the background without any other intervention until its tasks are complete.
I am figuring I need to use the Httpwebrequest objects... but like I said before, I do not know C# and how to implement this. I have been researching and trying different things all day. I can get to the webpage, but it of course sends back a error 401. I need to input the credentials at this point, but not sure how.
I am trying NetworkCredential myCredentials = new NetworkCredential(username, password);
with no success.
what I need is some hand holding on this. I have had plenty of people give me suggestions of what objects to use. But what I need, is someone to "show" me how to implement these methods.
Forgive my C# ignorance here.
Davidscott59 2-Mar-11 19:10pm View    
Deleted
Here is a small fragment of a data file.

<fri oct="" 1="" 01:44:21="" 2010=""> {1040} STATUS vpp.00 +0002: [524] wireless_check Loc <ATHENA^+0002> Len <58> Drop Count <2> Drop Seconds <18.040> RSSI <45> Batt <96 0x0> AP <000B86:C5E7D1>
<fri oct="" 1="" 01:45:22="" 2010=""> {1040} STATUS vpp.00 +0002: [524] wireless_check Loc <ATHENA^+0002> Len <119> Drop Count <4> Drop Seconds <35.992> RSSI <45> Batt <97 0x0> AP <000B86:C5E7D1>
<fri oct="" 1="" 01:45:57="" 2010=""> {1040} STATUS vpp.00 +0002: [524] wireless_end Loc <ATHENA^+0002> Len <144> Drop Count <4> Drop Seconds <35.992> RSSI <45> Batt <96 0x0> AP <000B86:C5E7D1>
<fri oct="" 1="" 01:46:06="" 2010=""> {1022} STATUS loc: [268] $WIRELESS (606, 596) {1040} vpp.00 PropaqLTR 802 Serial KA000002 (GLS_EQUIPMENT_ALARM COMMS_PRIMARY_NODE) Primary <athena>; Redirect from 172.29.34.239;7712 to 172.29.34.239;7712 for attach_wireless(2)
<fri oct="" 1="" 01:46:11="" 2010=""> {1022} STATUS loc: [268] $WIRELESS (606, 596) {1040} vpp.00 PropaqLTR 802 Serial KA000002 (GLS_EQUIPMENT_ALARM COMMS_PRIMARY_NODE) Primary <athena>; Redirect from 172.29.34.239;7712 to 172.29.34.239;7712 for attach_wireless(2)
<fri oct="" 1="" 01:46:16="" 2010=""> {1022} STATUS loc: [268] $WIRELESS (606, 596) {1040} vpp.00 PropaqLTR 802 Serial KA000002 (GLS_EQUIPMENT_ALARM COMMS_PRIMARY_NODE) Primary <athena>; Redirect from 172.29.34.239;7712 to 172.29.34.239;7712 for attach_wireless(2)
<fri oct="" 1="" 01:46:21="" 2010=""> {1022} STATUS loc: [268] $WIRELESS (606, 596) {1040} vpp.00 PropaqLTR 802 Serial KA000002 (GLS_EQUIPMENT_ALARM COMMS_PRIMARY_NODE) Primary <athena>; Redirect from 172.29.34.239;7712 to 172.29.34.239;7712 for attach_wireless(2)
<fri oct="" 1="" 01:46:34="" 2010=""> {1022} STATUS loc: [268] $WIRELESS (606, 596) {1040} vpp.00 PropaqLTR 802 Serial KA000002 (GLS_EQUIPMENT_ALARM COMMS_PRIMARY_NODE) Primary <athena>; Redirect from 172.29.34.239;7712 to 172.29.34.239;7712 for attach_wireless(2)
<fri oct="" 1="" 01:47:40="" 2010=""> {1040} STATUS vpp.00 +0002: [524] wireless_check Loc <ATHENA^+0002> Len <55> Drop Count <1> Drop Seconds <9.064> RSSI <45> Batt <93 0x0> AP <000B86:C5E7D1>
<fri oct="" 1="" 01:48:41="" 2010=""> {1040} STATUS vpp.00 +0002: [524] wireless_check Loc <ATHENA^+0002> Len <118> Drop Count <3> Drop Seconds <26.048> RSSI <45> Batt <96 0x0> AP <000B86:C5E7D1>
Davidscott59 28-Feb-11 18:57pm View    
I don't think I need to treat it like a DateTime Object. These are just log files I am parsing, and I am searching for a string. It just happens that the string is in the format of a date and time. And yes, I would need to get right down to the second because the data logger is recording in the format of HH:mm:ss. so I would have to find the last second ( up to 59) of the string I am searching for. The snippet of code I put in here for solution 3 works, but it does not consider what would happen if there was an end time within the 60 seconds of my time, since I am only looking at HH:MM.(reason is the user may not know the seconds) My code also does not trap if it can't find either the start or stop time strings in the search. I need to figure out how to do these three things tasks.. But maybe I am missing something in my thinking logic. I will dissect your code and see if it will work for me....
Davidscott59 28-Feb-11 17:18pm View    
I should clarify, here that my data log could have thousands of lines in it. Is it a good idea to read the entire file into a string??
ALso.... I tried you snippet of code. It does not work. the int variable start always returns a -1 at the content.Indexof() return