Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RF Id <-> Network Id Translation #83

Merged
merged 1 commit into from
May 19, 2019
Merged

RF Id <-> Network Id Translation #83

merged 1 commit into from
May 19, 2019

Conversation

HegrJan
Copy link
Contributor

@HegrJan HegrJan commented May 19, 2019

Solved #57 by adding the IdRewrite=RFId,NetId rule to the network configuration section. Multiple such rules can be specified for one network. Matching source Id is rewritten before writing to the network, incoming private calls to the Network Id are rewritten to the RF Id.

@g4klx
Copy link
Owner

g4klx commented May 19, 2019

I’m still not happy with the concept but the code is fine. I’ll add it and see if any abuse of it is reported. Thanks for the contribution.

@g4klx g4klx merged commit d5fbf0b into g4klx:master May 19, 2019
@d51r3verse
Copy link
Contributor

d51r3verse commented May 23, 2019

I agree with g4klx, seems abusing features. Also you implemented so complicated...
You can just change orders every SrcRewrite first, then TGRewrite. That's all.
No need to add bunch of codes... and I think you break consistency( Final level rewrites only RFRewrites, and NetRewrites )

@HegrJan Here is suggested mine #74 implementations

RewriteType -> RewriteSrc -> RewritePC -> RewriteTG -> PassAllTG -> PassAllPC

What for?: For keep super simple base TGRewrites[1-999999:11000001-11999999],[1-999999:12000001-12999999] to every 5 networks, Additional few special(parrot,ref control) rules controlled by SrcRewrite or TypeRewrite[additional private call range control] properly working.
image

I hope this commit should be remove for keep consistency.

Solved #57 by adding the IdRewrite=RFId,NetId rule to the network configuration section. Multiple such rules can be specified for one network. Matching source Id is rewritten before writing to the network, incoming private calls to the Network Id are rewritten to the RF Id.

@HegrJan
Copy link
Contributor Author

HegrJan commented May 23, 2019 via email

@d51r3verse
Copy link
Contributor

Please use exist m_dmr*RFRewrites and m_dmr1NetRewrites.
I think it is bad idea to call direct rewrite without return value check.

@HegrJan
Copy link
Contributor Author

HegrJan commented May 23, 2019 via email

@d51r3verse
Copy link
Contributor

d51r3verse commented May 24, 2019

1: You did not consider XLX network
2: Lack of consideration of NET->RF( complicated exist rewrites + your suspicious IdRewrites )

In current implementation RFRewrites are used to route the traffic to the desired network. Only one (first matching) rewrite rule is applied.

Yes, I know why you are not using generic m_dmr*RFRewrites and nested rewrites( call rewrites directly as XLX rewrites does ).
However, Why you use generic m_dmr*NetRewrites and why Group calls only(your CRewriteSrcId does not care call type) especially for NET->RF rewirtes?
Even in your own functions, there are no consistency.
Probably you using MMDVMHost for personal hotspot, therefore don't need incoming group talk source DMRID translation I thought.

This may not met for others needs I think. And someone confusing(local repeater users)
ie) IdRewrite=1,2 never effects if hits SrcRewrite first(control for parrot or special control responses some servers)
Because NET->RF processing orders in m_dmr*NetRewrites should be...

CRewriteTG(m_dmrXName, (*it).m_toSlot, (*it).m_toTG, (*it).m_fromSlot, (*it).m_fromTG, (*it).m_range);
CRewriteSrc(m_dmrXName, (*it).m_fromSlot, (*it).m_fromId, (*it).m_toSlot, (*it).m_toTG, (*it).m_range);
CRewriteDstId(m_dmrXName, (*it).m_netId, (*it).m_rfId);
CPassAllTG(m_dmrXName, *it);
CPassAllPC(m_dmrXName, *it);

You just considered only for your environments( /w massive master repo file changed).
MMDVMHost is not for personal hotspot only, many others using it for public repeater too. I think this commit not suitable for master repository.

@HegrJan HegrJan deleted the IdRewrite branch January 13, 2020 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants