start doc

This commit is contained in:
Michael Davidsaver
2015-09-09 17:02:27 -04:00
parent 56d3b9b4e0
commit ee6442ec90
4 changed files with 76 additions and 10 deletions

View File

@ -32,22 +32,47 @@ If no connected entry exists, then the request is failed.
Structure associations
ServerChannelProvider 1->1 ChannelCache (composed)
```c
ChannelCache 1->N ChannelCacheEntry (map<shared_ptr<E> >)
ChannelCache :: cacheLock
struct ServerContextImpl {
vector<shared_ptr<ChannelProvider> > providers; // GWServerChannelProvider
};
ChannelCacheEntry 1->1 ChannelCache (C*)
ChannelCacheEntry 1->1 Channel (PVA Client) (shared_ptr<C>)
struct GWServerChannelProvider : public pva::ChannelProvider {
ChannelCache cache;
};
Channel (PVA Client) 1->1 CRequester (shared_ptr<R>)
Channel :: lock
struct ChannelCache {
weak_pointer<ChannelProvider> server;
map<string, shared_ptr<ChannelCacheEntry> > entries;
CRequester 1->1 ChannelCacheEntry (weak_ptr<E>)
epicsMutex cacheLock; // guards entries
};
ChannelCacheEntry 1->N GWChannel (std<C*>)
struct ChannelCacheEntry {
ChannelCache * const cache;
shared_ptr<Channel> channel; // InternalChannelImpl
set<GWChannel*> interested;
};
GWChannel 1->1 ChannelCacheEntry (shared_ptr<E>)
struct InternalChannelImpl { // PVA client channel
shared_ptr<ChannelRequester> requester; // ChannelCacheEntry::CRequester
};
struct ChannelCacheEntry::CRequester {
weak_ptr<ChannelCacheEntry> chan;
};
struct GWChannel {
shared_ptr<ChannelCacheEntry> entry;
shared_ptr<ChannelRequester> requester; // pva::ServerChannelRequesterImpl
};
struct pva::ServerChannelImpl : public pva::ServerChannel
{
shared_ptr<Channel> channel; // GWChannel
};
```

2
documentation/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.png
*.svg

8
documentation/Makefile Normal file
View File

@ -0,0 +1,8 @@
all: structs.png
%.png: %.dot
dot -o $@ -Tpng $<
clean:
rm -f structs.png

31
documentation/structs.dot Normal file
View File

@ -0,0 +1,31 @@
digraph {
serv [label="ServerContextImpl"];
gwprov [label="GWServerChannelProvider"];
cache [label="ChannelCache"];
entry [label="ChannelCacheEntry"];
clichan [label="InternalChannelImpl"];
gwchan [label="GWChannel"];
creq [label="CRequester"];
servreq [label="ServerChannelRequesterImpl"];
servchan [label="ServerChannelImpl"];
serv -> gwprov [color=red,label="N"];
gwprov -> cache [color=red,label="1"];
cache -> entry [color=green,label="N"];
cache -> gwprov [color=blue,label="1"];
entry -> cache [color=blue,label="1"];
entry -> clichan [color=red,label="1"];
entry -> gwchan [color=blue,label="N"];
clichan -> creq [color=red,label="1"];
creq -> entry [color=blue,label="1"];
gwchan -> entry [color=red,label="1"];
gwchan -> servreq [color=red,label="1"];
servchan -> gwchan [color=red,label="1"];
}