Other Dll's

ceaser

Active Member
Licensed User
Hi Everbody

I need help\advise again!

I have been given a couple of DLL's from Nikon that are onboard the Nivo Total Station. This will help me in that I can send commands to The Total Station onboard.

Can I access these Dll's with Basic4ppc without having to change anything with the Dll's?

Regards
Michael
 

mjcoon

Well-Known Member
Licensed User
Hi Everbody

I need help\advise again!

I have been given a couple of DLL's from Nikon that are onboard the Nivo Total Station. This will help me in that I can send commands to The Total Station onboard.

Can I access these Dll's with Basic4ppc without having to change anything with the Dll's?

Regards
Michael

Again, without really knowing the answer, I can try asking a question that knowledgeable persons might ask, viz: do you have at least a header (source code) file that defines what the interfaces are that the DLLs provide?

Mike.
 

agraham

Expert
Licensed User
Longtime User
Are the dlls native or managed code? In either case you will probably need a library to expose them. Do you have any documentation for them? If so then I'll take a look at it for you to see how big a job it is. If they are too big to post here I'll send you a PM with an email address.
 

ceaser

Active Member
Licensed User
Hi Agraham

I have no documentation on these Dll, but I am going to attach one of them and if you could have a look at it please.

I am prepared to pay for your effort, as the success will open a huge market for my surveying program.

Regards
Michael
 
Last edited:

agraham

Expert
Licensed User
Longtime User
Both libraries appear to be .NET Compact Framework 2.0 (or maybe 3.5) assemblies. Both are obfuscated making it difficult to see what is happening inside them.

Base.Communications appears to be a Bluetooth communications module used to interface from a Bluetooth serial port to the onboard application.

The much much larger AppCmn.TSMeasure contains a whole load of stuff, including what look like several Forms called BaseMeasureForm, BaseStakeoutMeasureForm, BaseSurveyMeasureForm, HorizontalAngleForm, TSModeForm and TSModeStakeoutForm in a class called NikonTrimble.Mobile.App. This looks like a relatively high level user interface library used by the normal onboard application.

I think that what you really need is the lower level interface to the actual instrument measurement hardware that this higher level library uses and I can't see where that information is being obtained from because of the obfuscation and the lack of those libraries. I can see that there other lower level Forms, like BaseHardBubbleLevelForm, in other lower level libraries that you do not have. I suspect what you need is in these other lower level libraries but I'm afraid that without some documentation of how to obtain the information you need from those libraries you are stuck. :(
 

ceaser

Active Member
Licensed User
Hi AGraham

Thank you very much for your effort....I am going to wite to Nikon again.

Regards
Michael
 

ceaser

Active Member
Licensed User
Hi Agraham

This is what was attached to the mail from Nikon:

As mentioned in my previous e-mail, the interface libraries are available on the instrument (on-board hard drive) and can be accessed for software development.

From within Visual Studio 2008, under the Project window….

In the references subdirectory, right click and select add reference. The reference window will open. Click the browse tab. Find the dll’s that comes with the TSMode on the total station.
You will need these ones: - See attached files on top.

Once added, you can view the library in the object browser. He will use the TStation class in the Communications library.

Hope this helps…


Does this make any sense...I am not really Visual Studio expert!

Regards
Michael
 

agraham

Expert
Licensed User
Longtime User
If the instrument can be remotely controlled then obviously the communication library can interact with the instrument so it does make sense to expose an internal interface there so it can also be controlled locally. However I wasn't expecting it to be there as I personally would have kept the Communication library dedicated to remote use and exposed a local interface independently. :eek:

There isn't a class called TStation in the Communication library but there is one called TSControl which looks like it does the business. Attached is a text files with the events, methods, properties and data structures that it implements. Does it look like what you expect? Perhaps you can confirm with Nikon that this is the correct class and check that they really don't have any documentation for this class as they have seemed to indicate.

Do you have any documentation for remote operation? I would expect the commands available remotely to map onto the methods and properties of TSControl.

It looks like a fairly straightforward but long-winded task to expose TSControl as a Basic4ppc library. Whether there is a showstopper hidden along the way is impossible to tell at the moment but if the remote commands offer the functionality you need then there is a good chance that it would work. Unfortunately the obfuscation of the code makes it difficult to see what is really going on.

As I am retired I am reluctant to make a commitment to produce this library as it would mean taking responsibility for what is likely to be a large amount of your time and effort and involve me in quite a lot of work. Distance and the fact that I am no longer set up for Compact Framework development are also factors. Do you know anyone locally who is familiar with C# and either Visual Studio or SharpDevelop? I could provide him/her with some sample code and explanation as to how to do the Basic4ppc dependent part of the coding and you might be able to give him/her the insight of which of those properties and methods in TSControl are of use to you.
 

Attachments

  • TSControl.txt
    11.6 KB · Views: 273

ceaser

Active Member
Licensed User
Hi Agraham

Thank you very much for your effort.

I have written a Survey\CAD program for the PC with Visual Bais Express, so maybe I should download the professional version and rewrite my mobile surveying program using VB.net?

As a last resort, I am attaching the module that reads\writes to the Total Station....maybe you see there that can help you.



Regards
Michael
 

agraham

Expert
Licensed User
Longtime User
rewrite my mobile surveying program using VB.net?
Assuming you still intend it to run onboard the instrument you will still need to implement most of what would be in a Basic4ppc library but it might be a good idea for other reasons which only you can decide. You would need VS 2008 Professional as VS2010, which is what I am presently using, doesn't support the Compact Framework. I believe you can also use Sharp Develop, which is free but I have never investigated that.

maybe you see there that can help you.
Help me with what? :confused: I thought I covered everything in my previous post.
 

ceaser

Active Member
Licensed User
Hi Agraham

Sorry for being a pain in the backside:sign0013:, but I really need your help please.

I know VB.net fairly well, but I need a nudge in the right direction to write a wrapper for Nikon's DLL's. I have written to Nikon requesting some documentation on their DLL.

I have written a Survey Program using Visual Studio 2010 for CAD, contours, 3D views, volumes, Tin models, etc for the PC and I thought rewritting my mobile surveying program in VB2008 would be a breeze....how wrong I was!

Nothing beats Basic4ppc to develope programs for mobile devices. Microsoft could learn something from Erel:sign0188:

I understand that they are going to re-introduce mobile programming (Windows Mobile and Windows CE) into the 2012 version?

Kind Regards
Michael
 

agraham

Expert
Licensed User
Longtime User
About 5 years ago Erel posted this example of a ScrollBar library http://www.b4x.com/forum/code-samples-tips/35-how-create-basic4ppc-library.html. There is a VB version in post #3.

I understand that they are going to re-introduce mobile programming (Windows Mobile and Windows CE) into the 2012 version?
That's news to me. I know Windows Phone 8 is being added soon. The closest I could find was this quote from Microsoft
In the first quarter of 2013, we plan to provide tooling for Visual Studio 2012 to create apps for Windows Embedded Compact v.Next. We’ll be announcing more details in September, including the roadmap for .NET CF. You can find more details this Fall in the Windows Embedded Compact website at Windows Embedded | Evaluate & Develop Microsoft.
Note "v.Next", as I understand it this is not the same as the existing Windows Mobile and CE platforms.
 
Top